All Implemented Interfaces:
EquipListener, TurnListener, UseListener, Killer, Cloneable, Iterable<String>, Serializable
Direct Known Subclasses:
BoardToken

public class Token extends Item
Tokens are items which trigger an event on movement. They may not be equipped.
Author:
hendrik
  • Constructor Details

    • Token

      public Token(String name, String clazz, String subclass, Map<String,​String> attributes)
      Creates a new token.
      Parameters:
      name - name of item
      clazz - class (or type) of item
      subclass - subclass of this item
      attributes - attributes (like attack). may be empty or null
    • Token

      public Token(Token item)
      Copy constructor.
      Parameters:
      item - item to copy
  • Method Details

    • 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 Item
      Parameters:
      player - the player who drops the Item.
    • setTokenMoveListener

      public <T extends Token> void setTokenMoveListener(Token.TokenMoveListener<T> tokenMoveListener)
      Sets a TokenMoveListener.
      Parameters:
      tokenMoveListener - TokenMoveListener