java.lang.Object
polimi.ingsw.am21.codex.model.Cards.Playable.PlayableSide
All Implemented Interfaces:
CliCard
Direct Known Subclasses:
PlayableBackSide, PlayableFrontSide

public abstract class PlayableSide extends Object implements CliCard
  • Constructor Details

    • PlayableSide

      public PlayableSide()
  • Method Details

    • getCorners

      public Map<CornerPosition,Corner<CornerContentType>> getCorners()
    • setCorner

      public void setCorner(CornerPosition position, Optional<CornerContentType> content)
    • getEvaluator

      public abstract BiFunction<PlayerBoard,Integer,Integer> getEvaluator()
      Generates a function that should be called to get the points that should be attributed to a player when they place a card on this side. The returned function requires a PlayerBoard an Integer representing the number of corners the card is covering.
    • getPlaceabilityChecker

      public Function<PlayerBoard,Boolean> getPlaceabilityChecker()
      Generates a function that should be called to get whether a side is placeable or not given a certain PlayerBoard.
    • 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