Class MovePandaAction

java.lang.Object
com.takenoko.actions.actors.MovePandaAction
All Implemented Interfaces:
Action, DefaultAction
Direct Known Subclasses:
ForcedMovePandaAction

public class MovePandaAction extends Object implements DefaultAction
This class represents the action of moving the panda.
  • Field Details

    • relativePositionVector

      private final PositionVector relativePositionVector
  • Constructor Details

    • MovePandaAction

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

    • canBePlayed

      public static boolean canBePlayed(Board board)
    • execute

      public ActionResult execute(Board board, BotManager botManager)
      Move the panda 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
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

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

      public int hashCode()
      Overrides:
      hashCode in class Object