java.lang.Object
polimi.ingsw.am21.codex.model.Cards.Card
polimi.ingsw.am21.codex.model.Cards.Objectives.ObjectiveCard
All Implemented Interfaces:
GuiElement, CliCard

public class ObjectiveCard extends Card implements CliCard
  • Constructor Details

    • ObjectiveCard

      public ObjectiveCard(int id, int points, Objective objective)
  • Method Details

    • getEvaluator

      public Function<PlayerBoard,Integer> getEvaluator()
      Description copied from class: Card
      Generates a function that, when called by passing the player board, returns the points of the card.
      Specified by:
      getEvaluator in class Card
    • cardToString

      public String cardToString()
      Specified by:
      cardToString in interface CliCard
    • cardToAscii

      public String cardToAscii(HashMap<Integer,String> cardStringMap)
      Description copied from interface: CliCard
      Converts the card to an ASCII representation
      Specified by:
      cardToAscii in interface CliCard
      Parameters:
      cardStringMap - Maps the position of the item to the corresponding string to render inside the card
      Returns:
      The rendered ASCII string