| Trees | Index | Help |
|
|---|
| Package svs_demogame :: Module gameworld :: Class Gameworld |
|
| Method Summary | |
|---|---|
__init__(self)
| |
Adds agent to gameworld. | |
Adds new agent group. | |
Creates a gameworld from data read in from external file. | |
Creates a gameworld of specified dimensions. | |
Returns agent with specified id number. | |
Returns area at specified index coordinates. | |
Returns area with specified id number. | |
Get reported changes in game world. | |
Returns model of game world in current condition. | |
Collects changes in condition of terrain and agents. | |
Starts gameworld. | |
Stops gameworld. | |
Updates world and all active components. | |
| Method Details |
|---|
addAgent(self, agent)Adds agent to gameworld. Makes sure that the agent belongs to and fits within the gameworld terrain. |
addAgentGroup(self, groupName, groupColour)Adds new agent group. Seesvs_demogame.agents.AgentGroupManager.addAgentGroup.
|
createFromFile(self, filepath)
Creates a gameworld from data read in from external file.
Reads settings from C{filepath} which should be
to a file containing the following:
Essential:
- dimensions of world
- number of areas in x and y axes
- number of agents at start
- start location for each agent
Optional:
- density values for areas
|
createTerrain(self, dimX, dimY, areasX, areasY)Creates a gameworld of specified dimensions. |
getAgentWithId(self, areaId)Returns agent with specified id number. |
getAreaAtIndices(self, index_x, index_y)Returns area at specified index coordinates. If not found returns None. |
getAreaWithId(self, areaId)Returns area with specified id number. |
getChanges(self)Get reported changes in game world. |
getModel(self)Returns model of game world in current condition. |
reportChange(self, changeData, keyName)Collects changes in condition of terrain and agents. |
start(self)Starts gameworld. |
stop(self)Stops gameworld. |
update(self)Updates world and all active components. |
| Trees | Index | Help |
|
|---|
| Generated by Epydoc 2.1 on Thu Oct 20 15:30:25 2005 | http://epydoc.sf.net |