Class EntityTurnAction


  • public class EntityTurnAction
    extends EntityAction
    An entity action for when the entity turned
    Author:
    Tim Neumann
    • 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 at
        entity - the entity that caused the action
        from - the direction the entity was facing before the turn
        to - 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 class Action
        Returns:
        the description of this action