Draws the shape to canvas depending on the template selected for all selections
relating to the Game of Life.
Calls the relevant method in the CellSpace class.
Implements the Sugarscape template by calling the relevant method in
the CellSpace class.
Provides the option to specify physical dimensions by passing parameters
for columns and rows through HTML code.
This file provides the most direct option to configure and manipulate
the behavior and properties of objects in the Sugarscape simulation.
It allows a researcher to create an initial scenario and to tweak rules
within that scenario.
Returns true, if the personality type for the citizen is risk-averse
OR
below the poverty level as defined by GoLconst.SUGAR_LEVEL_POOR and
GoLconst.SPICE_LEVEL_POOR
Paints the citizen in to one of eight possible shapes
The classification comprises eight categories and are representedgraphically as icons
drawn using a combination of ovals and rectangles.
Built-on the original code from
--------------------------------
Game of Life v1.3
Copyright 1996-2001 Edwin Martin
version 1.0 online since July 3 1996
Changes:
1.1: Double buffering to screen; faster paint
1.2: Arrowkeys changed; better use of `synchronized'
1.3: Choose speed from drop down menu and draw with mouse
-------------Sugarscape - Linked List version------------
-------------abraham kannankeril---------------------------
1.4: Added template 'Random'& 'Big Bang' to layout choices
-------------------------xxx-------------------------------
2.0: Add Sugarscape & Citizen objects incorporating a new
& more sophisticated ruleset.
-> a single resource (sugar) is randomly dispersed on the grid (sugarscape)
-> citizens scattered on the sugarscape must collect & consume sugar to ensure survival
-> citizens possess attributes - vision, metabolism & sugar hoard
System-level variables can be manually adjusted via public constants to influence
behavior on the sugarscape.
2.1: Split into multiple files for better manageablity - package GameOfLife
Added system variable DEBUG to switch debug info ON/OFF
2.2: Added visual representation of cell & citizen properties
-> cells shaded to represent available sugar level (low / medium / high)
-> citizen shaded to represent available sugar level (low / medium / high)
-> citizen shape conveys representation of following combined properties
- high vision, high metabolism
- high vision, low metabolism
- low vision, high metabolism
- low vision, low metabolism
2.21 Improved sugar search routine to enable neutral selection between equally fertile cells
and selection of random cell if no sugar available to citizen
Added boolean variables to toggle debugging of selected program functions
Added boolean flag to allow imposition of limits on sugar accumulation in cells and a
corresponding method to depict absolute values of the sugar matrix
Color cues implemented in visual display:
-> Cell color darkens according to sugar accumulated in each cell
-> Citizen color gradually varies from red to orange to yellow to green to represent
the amount of sugar collected
-> Citizen shape varies to depict one of four relative vision/metabolism combinations
-> Grid coordinates can be printed if needed.
No start() to prevent starting immediately.
This method enables the GUI to initialize and await action from the user
to begin execution, rather than executing as soon as the applet has
finished loading.