Package it.polimi.ingsw.Server.Model
Class ObjectCard
java.lang.Object
it.polimi.ingsw.Server.Model.ObjectCard
- All Implemented Interfaces:
ObjectCardInterface
,Remote
This class represents all the ObjectCards' definition methods
-
Field Summary
Modifier and TypeFieldDescriptionprivate int
Card's image indicated using an Integer attribute (1-3)private static final int
static final int
Maximum amount of cards that can be extracted, used for validation in Board reset methods LIMIT = Number of Object Cards Types (detected dynamically), multiplied for 22 (based on rulebook, total number of cards for type)private ObjectCardType
Card's typeprivate static final int
-
Constructor Summary
ConstructorDescriptionObjectCard
(ObjectCardType type) ObjectCard's constructor, used only for testingObjectCard
(List<ObjectCard> list) ObjectCard's constructor -
Method Summary
-
Field Details
-
LIMIT
public static final int LIMITMaximum amount of cards that can be extracted, used for validation in Board reset methods LIMIT = Number of Object Cards Types (detected dynamically), multiplied for 22 (based on rulebook, total number of cards for type) -
TYPESLIMIT
private static final int TYPESLIMIT- See Also:
-
IMAGESLIMIT
private static final int IMAGESLIMIT- See Also:
-
type
Card's type -
image
@Expose private int imageCard's image indicated using an Integer attribute (1-3)
-
-
Constructor Details
-
ObjectCard
ObjectCard(List<ObjectCard> list) throws Exception ObjectCard's constructor- Parameters:
list
- (1st parameter) List that contains all the objectcards used in the game- Throws:
Exception
-
ObjectCard
ObjectCard(ObjectCardType type) throws RemoteException ObjectCard's constructor, used only for testing- Parameters:
type
- type of the new instance of ObjectCard- Throws:
RemoteException
-
-
Method Details
-
getType
This method return objectcard's type- Returns:
- type card's type
-
getImage
public int getImage()This method returns Object Card's image- Returns:
- int image
-