Mercurial > rinkhals
comparison gamelib/gameboard.py @ 325:b07ea17b8b4e
Move starting chickens to constants
author | Neil Muller <drnlmuller@gmail.com> |
---|---|
date | Sat, 05 Sep 2009 21:38:41 +0000 |
parents | 978efd39a099 |
children | 89f51d513606 |
comparison
equal
deleted
inserted
replaced
324:305af737c0a8 | 325:b07ea17b8b4e |
---|---|
942 def add_some_chickens(self): | 942 def add_some_chickens(self): |
943 """Add some random chickens to start the game""" | 943 """Add some random chickens to start the game""" |
944 x, y = 0, 0 | 944 x, y = 0, 0 |
945 width, height = self.tv.size | 945 width, height = self.tv.size |
946 tries = 0 | 946 tries = 0 |
947 while len(self.chickens) < 10: | 947 while len(self.chickens) < constants.START_CHICKENS: |
948 if x < width: | 948 if x < width: |
949 tile = self.tv.get((x, y)) | 949 tile = self.tv.get((x, y)) |
950 else: | 950 else: |
951 y += 1 | 951 y += 1 |
952 if y >= height: | 952 if y >= height: |