Class BoardToken

All Implemented Interfaces:
EquipListener, TurnListener, UseListener, Killer, Cloneable, Iterable<String>, Serializable

public class BoardToken extends Token
a token to be used on a game board
Author:
hendrik
  • Constructor Details

    • BoardToken

      public BoardToken(String name, String clazz, String subclass, Map<String,​String> attributes)
      Parameters:
      name -
      clazz -
      subclass -
      attributes -
    • BoardToken

      public BoardToken(Token item)
      Parameters:
      item -
  • Method Details

    • wasMovedFromHomeInLastMove

      public boolean wasMovedFromHomeInLastMove()
      was this token on its home spot before the last move?
      Returns:
      true iff the token was on the home spot before this move
    • onPutOnGround

      public void onPutOnGround(Player player)
      Description copied from class: Item
      Is called when the item is moved to the ground.
      Overrides:
      onPutOnGround in class Token
      Parameters:
      player - the player who drops the Item.
    • setHomePosition

      public void setHomePosition(int x, int y)
      sets the home position for this token.
      Parameters:
      x - x
      y - y
    • resetToHomePosition

      public void resetToHomePosition()
      moves this token back to the home position
    • undoMove

      public void undoMove()