Package it.polimi.ingsw.model
Class PrivateObjective
java.lang.Object
it.polimi.ingsw.model.PrivateObjective
- All Implemented Interfaces:
Serializable
class which represent the private objective for each player. Immutable
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionint
the columns of the library that will be checked by the objectivefinal String
int
the unique identifier of the private objectiveint
the rows of the library that will be checked by the objective -
Constructor Summary
ConstructorsConstructorDescriptionPrivateObjective
(Card[][] mat, int id) normal constructor for this type of objects -
Method Summary
Modifier and TypeMethodDescriptionint
countPoints
(Card[][] cards) count the points accumulated by the playervoid
draw()
method that draws the objective itself (the matrix of cards)
-
Field Details
-
imagePath
-
objectiveId
public int objectiveIdthe unique identifier of the private objective -
ROWS
public int ROWSthe rows of the library that will be checked by the objective -
COLS
public int COLSthe columns of the library that will be checked by the objective
-
-
Constructor Details
-
PrivateObjective
normal constructor for this type of objects- Parameters:
mat
- the matrix which identify the objectiveid
- the unique identifier of the objective
-
-
Method Details
-
countPoints
count the points accumulated by the player- Parameters:
cards
- matrix of the player's library- Returns:
- number of total actual points
-
draw
public void draw()method that draws the objective itself (the matrix of cards)
-