Changes

no edit summary
Line 4: Line 4:  
The easiest file to get into is constants.py.  This file has collections of all the different modifiable elements in the game, along with any important constants, like starting money or lemonade price.
 
The easiest file to get into is constants.py.  This file has collections of all the different modifiable elements in the game, along with any important constants, like starting money or lemonade price.
   −
Each section consists of a dictionary or list, possibly containing more dictionaries.  To change a value in the game, simply make the corresponding change in the file.  For example, to make sugar cost $.07 per unit instead of $.05, cahnge 'cost': 5 to  'cost': 7 under 'Sugar'.
+
Each section consists of a dictionary or list, possibly containing more dictionaries.  To change a value in the game, simply make the corresponding change in the file.  For example, to make sugar cost $.07 per unit instead of $.05, change 'cost': 5 to  'cost': 7 under 'Sugar'.
      Line 18: Line 18:  
==GUI: LemonadeGui.py==
 
==GUI: LemonadeGui.py==
 
This file is broken up into a number of small methods each tasked with drawing one discrete element of the GUI.  These methods are then called by the draw() method which is in turn called when the game engine detects that something has changed on the screen.
 
This file is broken up into a number of small methods each tasked with drawing one discrete element of the GUI.  These methods are then called by the draw() method which is in turn called when the game engine detects that something has changed on the screen.
 +
 +
Methods should be as modular as it makes sense for them to be, with an eye towards keeping the XO from having to draw too much too often.  In other words, try to build as much as possible at once, but move anything that gets reused often to it's own method.
65

edits