changeset 325:b07ea17b8b4e

Move starting chickens to constants
author Neil Muller <drnlmuller@gmail.com>
date Sat, 05 Sep 2009 21:38:41 +0000
parents 305af737c0a8
children 89f51d513606
files gamelib/constants.py gamelib/gameboard.py
diffstat 2 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/gamelib/constants.py	Sat Sep 05 21:32:12 2009 +0000
+++ b/gamelib/constants.py	Sat Sep 05 21:38:41 2009 +0000
@@ -56,3 +56,5 @@
 
 ABS_MAX_NUM_FOXES = 50 # Limit possible uppoer number of foxes, due to concerns
                         # about performance, etc.
+
+START_CHICKENS = 10
--- a/gamelib/gameboard.py	Sat Sep 05 21:32:12 2009 +0000
+++ b/gamelib/gameboard.py	Sat Sep 05 21:38:41 2009 +0000
@@ -944,7 +944,7 @@
         x, y = 0, 0
         width, height = self.tv.size
         tries = 0
-        while len(self.chickens) < 10:
+        while len(self.chickens) < constants.START_CHICKENS:
             if x < width:
                 tile = self.tv.get((x, y))
             else: