Changeset 238:1a7097c0fc8f


Ignore:
Timestamp:
Sep 5, 2009, 9:54:47 AM (11 years ago)
Author:
Neil Muller <drnlmuller@…>
Branch:
default
Convert:
svn:b4e93282-eac8-4b8b-b765-0f5d36de2b68@239
Message:

Try harder to have 10 chickens at the start

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gamelib/gameboard.py

    r234 r238  
    779779        x, y = 0, 0
    780780        width, height = self.tv.size
     781        tries = 0
    781782        while len(self.chickens) < 10:
    782783            if x < width:
     
    785786                y += 1
    786787                if y >= height:
    787                     break
     788                    y = 0
     789                    tries += 1
     790                    if tries > 3:
     791                        break # Things have gone wierd
    788792                x = 0
    789793                continue
Note: See TracChangeset for help on using the changeset viewer.