Package it.polimi.ingsw.model
Class Card
java.lang.Object
it.polimi.ingsw.model.Card
- All Implemented Interfaces:
Serializable
class that represent the cards, both in the library and in the board. Mutable
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCard()
the most simple constructor, used to initialize the empty cardscopy constructor for this class, used for deep copying objectsstandard constructor to initialize card with the right colorconstructor that initialize both the color and the image -
Method Summary
-
Field Details
-
color
the color of the card, 6 types + EMPTY -
imagePath
-
-
Constructor Details
-
Card
constructor that initialize both the color and the image- Parameters:
col
- the color of the cardimage
- the path of the image file
-
Card
standard constructor to initialize card with the right color- Parameters:
col
- the color to set
-
Card
public Card()the most simple constructor, used to initialize the empty cards -
Card
copy constructor for this class, used for deep copying objects- Parameters:
c
- the object to copy
-
-
Method Details
-
draw
public void draw()method used to draw the card itself (TUI)
-