Class CardGold

All Implemented Interfaces:
CardIF, CardPlayableIF, Serializable

public class CardGold extends CardPlayable
Represents a golden car, that can be played in player's field sometime during the game. All information about the card and how it is being played are inherited by CardPlayable
See Also:
  • Constructor Details

    • CardGold

      public CardGold(String id, CardSidePlayable front, CardSidePlayable back)
      Creates a new card setting all its immutable attributes The card is created not visible in field
      Parameters:
      id - Id of the card
      front - Front side of the card
      back - Back side of the card
    • CardGold

      public CardGold(String id, Color color, Map<Resource,Integer> requirements, List<Corner> frontCorners, PointsPlayable points) throws InvalidCardCreationException
      Creates a new card setting all immutable attributs. Creates alse the sides
      Parameters:
      id - Id of the card
      color - Color of both sides of the card. Cannot be NO_COLOR
      requirements - Map representing the requirements to play the card (resource required -> number of that resource required)
      frontCorners - List of the 4 corners eventually with resources of the front side of the card
      points - Points (already created) guaranteed by the front side of the card
      Throws:
      InvalidCardCreationException - If the list of corners is not of size 4 or color is NO_COLOR