|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gecco.server.automaton.Automaton | +--gecco.game.firefighter.AutomatonImpl
Description of the Class
Field Summary | |
(package private) static int |
BURNING_TREE
Description of the Field |
(package private) int |
burningTime
Description of the Field |
(package private) static int |
BURNT_TREE
Description of the Field |
(package private) static String |
FIRE_EVENT_STRING
Description of the Field |
(package private) static int |
GROUND
Description of the Field |
(package private) static int |
HALF_BURNT_TREE
Description of the Field |
(package private) static int |
NON_BURNING_TREE
Description of the Field |
(package private) static int |
ROCK
Description of the Field |
(package private) static HashMap |
stateToColour
Description of the Field |
(package private) static int |
WATER
Description of the Field |
(package private) static String |
WATER_EVENT_STRING
Description of the Field |
(package private) int |
waterAmount
Description of the Field |
Fields inherited from class gecco.server.automaton.Automaton |
changed, currentColor, currentState |
Constructor Summary | |
AutomatonImpl()
|
Method Summary | |
(package private) static void |
|
private boolean |
existsNeighboursWithState(int[][] neighbourStates,
int state)
Description of the Method |
private AutomatonReturn |
fireReturn(int[][] neighbourStates)
Description of the Method |
UnitEvent |
getUnitEventForCurrentState(String unitType)
Gets the UnitEventForCurrentState attribute of the AutomatonImpl object |
AutomatonReturn |
handleEvent(AutomatonEvent event)
Description of the Method |
void |
initialize(int initialState)
Description of the Method |
private void |
setColour(int state)
Sets the Colour attribute of the AutomatonImpl object |
AutomatonReturn |
update(int[][] neighbourStates)
Description of the Method |
Methods inherited from class gecco.server.automaton.Automaton |
getCurrentColor, getState, hasChanged, setCurrentColor, setState |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
Field Detail |
int burningTime
int waterAmount
static final String FIRE_EVENT_STRING
static final String WATER_EVENT_STRING
static final int BURNING_TREE
static final int NON_BURNING_TREE
static final int BURNT_TREE
static final int ROCK
static final int GROUND
static final int WATER
static final int HALF_BURNT_TREE
static final HashMap stateToColour
Constructor Detail |
public AutomatonImpl()
Method Detail |
public UnitEvent getUnitEventForCurrentState(String unitType)
getUnitEventForCurrentState
in class Automaton
unitType
- Description of Parameterpublic void initialize(int initialState) throws IllegalArgumentException
initialize
in class Automaton
initialState
- Description of ParameterIllegalArgumentException
- Description of Exceptionpublic AutomatonReturn update(int[][] neighbourStates)
update
in class Automaton
neighbourStates
- Description of Parameterpublic AutomatonReturn handleEvent(AutomatonEvent event)
handleEvent
in class Automaton
event
- Description of Parameterprivate void setColour(int state) throws IllegalArgumentException
state
- The new Colour valueIllegalArgumentException
- Description of Exceptionprivate AutomatonReturn fireReturn(int[][] neighbourStates)
neighbourStates
- Description of Parameterprivate boolean existsNeighboursWithState(int[][] neighbourStates, int state)
neighbourStates
- Description of Parameterstate
- Description of Parameterstatic void()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |