# HG changeset patch # User Neil Muller # Date 1252144487 0 # Node ID 1a7097c0fc8f4070ab46fc3d3542d2186dc554b1 # Parent 4a87bfa5cc638b034077140e39be1cb588add3b7 Try harder to have 10 chickens at the start diff -r 4a87bfa5cc63 -r 1a7097c0fc8f gamelib/gameboard.py --- a/gamelib/gameboard.py Sat Sep 05 09:48:48 2009 +0000 +++ b/gamelib/gameboard.py Sat Sep 05 09:54:47 2009 +0000 @@ -778,13 +778,17 @@ """Add some random chickens to start the game""" x, y = 0, 0 width, height = self.tv.size + tries = 0 while len(self.chickens) < 10: if x < width: tile = self.tv.get((x, y)) else: y += 1 if y >= height: - break + y = 0 + tries += 1 + if tries > 3: + break # Things have gone wierd x = 0 continue # See if we place a chicken