java.lang.Object
polimi.ingsw.am21.codex.model.Cards.Card
All Implemented Interfaces:
GuiElement, CliCard
Direct Known Subclasses:
ObjectiveCard, PlayableCard

public abstract class Card extends Object implements CliCard, GuiElement
  • Constructor Details

    • Card

      public Card(int id)
      Parameters:
      id - A unique identifier for the card
  • Method Details

    • getId

      public int getId()
      Returns:
      The unique identifier of the card
    • getEvaluator

      public abstract Function<PlayerBoard,Integer> getEvaluator()
      Generates a function that, when called by passing the player board, returns the points of the card.
    • getImagePath

      public String getImagePath()
      Description copied from interface: GuiElement
      Gets the path of the image representing the element, relative to the base path. Does not need a leading slash.
      Specified by:
      getImagePath in interface GuiElement
    • getImagePath

      public String getImagePath(CardSideType sideType)
      Returns the path of the image of the card, given the side type
      Parameters:
      sideType - The visible side of the card