|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gecco.server.automaton.Automaton | +--gecco.game.dke.AutomatonImpl
Field Summary |
Fields inherited from class gecco.server.automaton.Automaton |
currentColor, x, y |
Fields inherited from interface gecco.server.replaymanager.ReplayReady |
AUTOMATON, MOVING_ACTION, UNIT |
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 |
isBlueZC()
Gets the value of blueZC |
boolean |
isRedZC()
Gets the value of redZC |
boolean |
isRoute()
|
boolean |
isVisited()
|
void |
playReplayData(int function,
Object[] parameters)
|
void |
saveReplayData(int automatonPosX,
int automatonPosY,
int function,
Object[] parameters)
|
void |
saveReplayData(int function,
Object[] parameters)
|
protected void |
setColor(int terrainType)
|
void |
setLastVisitor(int argLastVisitor)
Sets the value of lastVisitor |
void |
setLastVisitor(int argLastVisitor,
int argX,
int argY)
|
void |
setVisited(boolean b)
|
void |
setZC(boolean b,
int force,
int unitHandle)
|
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 Parameterprotected void setColor(int terrainType)
public 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.lastVisitorpublic boolean isBlueZC()
public boolean isRedZC()
public void setZC(boolean b, int force, int unitHandle)
public void saveReplayData(int function, Object[] parameters)
saveReplayData
in interface ReplayReady
public void saveReplayData(int automatonPosX, int automatonPosY, int function, Object[] parameters)
public void playReplayData(int function, Object[] parameters)
playReplayData
in interface ReplayReady
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |