|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.huguesjohnson.tiamat.demos.Camineet.BaseGameState
BaseGameState - base game state
| Constructor Summary | |
BaseGameState()
Create an empty BaseGameState. |
|
BaseGameState(Area currentArea)
Create a BaseGameState with an Area but no conditions. |
|
BaseGameState(Area currentArea,
java.lang.String[] conditions)
Create a BaseGameState with conditions and an Area. |
|
BaseGameState(java.lang.String[] conditions)
Create a BaseGameState with conditions but no Area. |
|
| Method Summary | |
void |
addCondition(java.lang.String condition)
Add a condition (something that has happened in the game). |
java.lang.String[] |
getConditions()
Returns all conditions (things that have happened in the game). |
Area |
getCurrentArea()
Returns the Area the game is currently in. |
boolean |
hasCondition(java.lang.String condition)
Tests if a specific condition has occured. |
void |
onDeserialize(Formatter formatter,
java.lang.String absoluteDir)
The onDeserialize event should be fired after an object is de-serialized. |
void |
setCurrentArea(Area currentArea)
Sets the Area the game is currently in. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public BaseGameState()
public BaseGameState(java.lang.String[] conditions)
conditions - The initial conditions for this BaseGameState.public BaseGameState(Area currentArea)
currentArea - The new Area the game is currently in.
public BaseGameState(Area currentArea,
java.lang.String[] conditions)
currentArea - The new Area the game is currently in.conditions - The initial conditions for this BaseGameState.| Method Detail |
public Area getCurrentArea()
public void setCurrentArea(Area currentArea)
currentArea - The new Area the game is currently in.public void addCondition(java.lang.String condition)
condition - The condition to add.public java.lang.String[] getConditions()
public boolean hasCondition(java.lang.String condition)
condition - The condition to search for.
public void onDeserialize(Formatter formatter,
java.lang.String absoluteDir)
onDeserialize in interface Storableformatter - the formatter to use to load any storable membersabsoluteDir - the working directory since all paths stored in the object should be relative
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||