diff gamelib/constants.py @ 389:463802281182

Add basic level support (level choosing needs work)
author Neil Muller <drnlmuller@gmail.com>
date Thu, 29 Oct 2009 20:55:37 +0000
parents 403250da36ef
children 8104e82afd7a
line wrap: on
line diff
--- a/gamelib/constants.py	Thu Oct 29 20:54:32 2009 +0000
+++ b/gamelib/constants.py	Thu Oct 29 20:55:37 2009 +0000
@@ -24,18 +24,27 @@
 BUFFER = 1024  # audio buffer size in no. of samples
 FRAMERATE = 30 # how often to check if playback has finished
 
-# Game constants
+# Default values that can be overridden by the levels
 
-STARTING_CASH = 1000
-SELL_PRICE_CHICKEN = 10
-SELL_PRICE_EGG = 5
-SELL_PRICE_DEAD_FOX = 15
+DEFAULT_STARTING_CASH = 1000
+DEFAULT_SELL_PRICE_CHICKEN = 10
+DEFAULT_SELL_PRICE_EGG = 5
+DEFAULT_SELL_PRICE_DEAD_FOX = 15
+DEFAULT_TURN_LIMIT = 14
+DEFAULT_GOAL_DESC = 'Survive for 2 weeks'
+
+DEFAULT_MAX_FOXES = 50
+
+# Game constants, still to be made configurable
+
 LOGGING_PRICE = 50
 BUY_PRICE_FENCE = 50
 SELL_PRICE_FENCE = 25
 REPAIR_PRICE_FENCE = 25
 SELL_PRICE_BROKEN_FENCE = 5
 
+# Toolbar constants
+
 TOOL_SELL_CHICKEN = 1
 TOOL_SELL_EGG = 2
 TOOL_SELL_BUILDING = 3
@@ -46,13 +55,4 @@
 
 NIGHT_LENGTH = 150
 
-TURN_LIMITS = {
-        'Two weeks' : 14,
-        'Three months' : 90,
-        'Unlimited' : 0,
-        }
 
-DEFAULT_MODE = 'Two weeks'
-
-ABS_MAX_NUM_FOXES = 50 # Limit possible uppoer number of foxes, due to concerns
-                        # about performance, etc.