java.lang.Object
it.polimi.ingsw.am13.model.card.Card
it.polimi.ingsw.am13.model.card.CardPlayable
it.polimi.ingsw.am13.model.card.CardGold
- All Implemented Interfaces:
CardIF
,CardPlayableIF
,Serializable
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 Summary
ConstructorsConstructorDescriptionCardGold
(String id, CardSidePlayable front, CardSidePlayable back) Creates a new card setting all its immutable attributes The card is created not visible in fieldCardGold
(String id, Color color, Map<Resource, Integer> requirements, List<Corner> frontCorners, PointsPlayable points) Creates a new card setting all immutable attributs. -
Method Summary
Methods inherited from class it.polimi.ingsw.am13.model.card.CardPlayable
getPlayedCardSide, getSide
Methods inherited from class it.polimi.ingsw.am13.model.card.Card
equals, getId, getVisibleSide, hashCode, placeCardInField, removeCardFromField, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface it.polimi.ingsw.am13.model.card.CardIF
getId, getVisibleSide
-
Constructor Details
-
CardGold
Creates a new card setting all its immutable attributes The card is created not visible in field- Parameters:
id
- Id of the cardfront
- Front side of the cardback
- Back side of the card
-
CardGold
public CardGold(String id, Color color, Map<Resource, Integer> requirements, List<Corner> frontCorners, PointsPlayable points) throws InvalidCardCreationExceptionCreates a new card setting all immutable attributs. Creates alse the sides- Parameters:
id
- Id of the cardcolor
- Color of both sides of the card. Cannot be NO_COLORrequirements
- 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 cardpoints
- 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
-