| Trees | Index | Help |
|
|---|
| Package svs_demogame :: Module terrain :: Class Terrain |
|
| Method Summary | |
|---|---|
__init__(self,
dimX,
dimY,
areasX,
areasY)
| |
Checks that specified coordinates are within boundaries of terrain. | |
Creates areas for terrain in given dimensions. | |
| Array |
Returns a list of areas which are adjacent to the specified area. |
Returns all areas in a flat list. | |
Returns area at specified index coordinates. | |
Returns area containing specified terrain coordinates. | |
Returns area with specified id number. | |
Get reported changes in terrain. | |
Returns a model of the terrain in its current state, suitable for serialisation and sending over network. | |
Collects changes in condition of areas and agents. | |
Sets default values for all areas. | |
Calls startPlay method on areas. | |
Calls stopPlay method on areas. | |
Updates areas within terrain. | |
| Method Details |
|---|
containsLocation(self, x, y)Checks that specified coordinates are within boundaries of terrain. |
createAreas(self, areasX, areasY)Creates areas for terrain in given dimensions. |
getAdjacentAreas(self, area, directions=(), markBoundary=False)Returns a list of areas which are adjacent to the specified area. If the directions are set these can be used to return only the neighbours in the specified directions. The directions are defined by compass names, 'N', 'S', 'E', 'W', 'NE', etc.
|
getAllAreas(self)Returns all areas in a flat list. |
getAreaAtIndices(self, x, y)Returns area at specified index coordinates. If not found returns None. |
getAreaAtLocation(self, xPoint, yPoint)Returns area containing specified terrain coordinates. If not found returns None. |
getAreaWithId(self, areaId)Returns area with specified id number. |
getChanges(self)Get reported changes in terrain. |
getModel(self)Returns a model of the terrain in its current state, suitable for serialisation and sending over network. |
reportChange(self, changeData, sourceEntity)Collects changes in condition of areas and agents. |
setAreaDefaults(self, density=None, script=None)Sets default values for all areas. |
start(self)CallsstartPlay method on areas.
|
stop(self)CallsstopPlay method on areas.
|
update(self, timeInterval)Updates areas within terrain. |
| Trees | Index | Help |
|
|---|
| Generated by Epydoc 2.1 on Thu Oct 20 15:30:29 2005 | http://epydoc.sf.net |