java.lang.Object
it.polimi.ingsw.am13.model.card.Card
it.polimi.ingsw.am13.model.card.CardPlayable
it.polimi.ingsw.am13.model.card.CardResource
- All Implemented Interfaces:
CardIF
,CardPlayableIF
,Serializable
Represents a resource 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
ConstructorsConstructorDescriptionCardResource
(String id, CardSidePlayable front, CardSidePlayable back) Creates a new card setting all its immutable attributes The card is created not visible in fieldCardResource
(String id, Color color, List<Corner> frontCorners, int 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
-
CardResource
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
-
CardResource
public CardResource(String id, Color color, List<Corner> frontCorners, int points) throws InvalidCardCreationException Creates 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_COLORfrontCorners
- List of the 4 corners eventually with resources of the front side of the cardpoints
- Number of points 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
-