Class MoveGardenerAction

java.lang.Object
com.takenoko.actions.actors.MoveGardenerAction
All Implemented Interfaces:
Action, DefaultAction

public class MoveGardenerAction extends Object implements DefaultAction
Action to move a gardener.
  • Field Details

    • relativePositionVector

      private final PositionVector relativePositionVector
  • Constructor Details

    • MoveGardenerAction

      public MoveGardenerAction(PositionVector relativePositionVector)
      Constructor for the MoveGardenerAction class.
      Parameters:
      relativePositionVector - the position vector to move the Gardener
  • Method Details

    • canBePlayed

      public static boolean canBePlayed(Board board)
    • execute

      public ActionResult execute(Board board, BotManager botManager)
      Move the Gardener with a vector on the board and display a message.
      Specified by:
      execute in interface Action
      Parameters:
      board - the board
      botManager - the bot manager
      Returns:
      the action result
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object