Class EntityTurnAction
- java.lang.Object
-
- de.unistuttgart.informatik.fius.icge.simulation.actions.Action
-
- de.unistuttgart.informatik.fius.icge.simulation.actions.EntityAction
-
- de.unistuttgart.informatik.fius.icge.simulation.actions.EntityTurnAction
-
public class EntityTurnAction extends EntityAction
An entity action for when the entity turned- Author:
- Tim Neumann
-
-
Constructor Summary
Constructors Constructor Description EntityTurnAction(long tickNumber, Entity entity, Direction from, Direction to)
Create an entity turn action.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Direction
from()
String
getDescription()
Direction
to()
-
Methods inherited from class de.unistuttgart.informatik.fius.icge.simulation.actions.EntityAction
getEntity
-
Methods inherited from class de.unistuttgart.informatik.fius.icge.simulation.actions.Action
getTickNumber, toString
-
-
-
-
Constructor Detail
-
EntityTurnAction
public EntityTurnAction(long tickNumber, Entity entity, Direction from, Direction to)
Create an entity turn action.- Parameters:
tickNumber
- the tick the action happened atentity
- the entity that caused the actionfrom
- the direction the entity was facing before the turnto
- the direction the entity is facing after the turn
-
-
Method Detail
-
from
public Direction from()
- Returns:
- the direction the entity was facing before the turn
-
to
public Direction to()
- Returns:
- the direction the entity is facing after the turn
-
getDescription
public String getDescription()
- Specified by:
getDescription
in classAction
- Returns:
- the description of this action
-
-