|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgecco.server.automaton.Automaton
gecco.game.dke.AutomatonImpl
Field Summary |
Fields inherited from class gecco.server.automaton.Automaton |
currentColor, x, y |
Constructor Summary | |
AutomatonImpl()
|
Method Summary | |
int |
getInitialState()
|
int |
getLastVisitor()
Gets the value of lastVisitor |
UnitEvent |
getUnitEventForCurrentState(String unitType)
Gets the UnitEvent for the current state of the automaton. |
AutomatonReturn |
handleEvent(AutomatonEvent event)
Handles incoming event to the automaton. |
void |
initialize(int initialState)
Initialises the automaton. |
boolean |
isRoute()
|
boolean |
isVisited()
|
void |
setLastVisitor(int argLastVisitor)
Sets the value of lastVisitor |
void |
setLastVisitor(int argLastVisitor,
int argX,
int argY)
|
void |
setVisited(boolean b)
|
AutomatonReturn |
update(int[][] neighourStates)
The update method of the automaton. |
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, toString, wait, wait, wait |
Constructor Detail |
public AutomatonImpl()
Method Detail |
public void initialize(int initialState)
Automaton
initialize
in class Automaton
initialState
- Description of Parameterpublic AutomatonReturn update(int[][] neighourStates)
Automaton
update
in class Automaton
neighourStates
- The states of the surrounding automatons, given
in a 3x3 integer grid.
public AutomatonReturn handleEvent(AutomatonEvent event)
Automaton
handleEvent
in class Automaton
event
- The AutomatonEvent
public UnitEvent getUnitEventForCurrentState(String unitType)
Automaton
getUnitEventForCurrentState
in class Automaton
unitType
- The name of the UnitType of the unit that has moved
over the automaton
public boolean isRoute()
public boolean isVisited()
public void setVisited(boolean b)
public int getInitialState()
public int getLastVisitor()
public void setLastVisitor(int argLastVisitor, int argX, int argY)
public void setLastVisitor(int argLastVisitor)
argLastVisitor
- Value to assign to this.lastVisitor
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |