Package it.polimi.ingsw.model
Class CommonObjective
java.lang.Object
it.polimi.ingsw.model.CommonObjective
- All Implemented Interfaces:
Serializable
class which represent the common objectives which all the players must try to achieve. Immutable
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal Strategy
the algorithm chosen, related to the specific common objectiveint
the columns of the library that will be checked by the objectivefinal int
the unique identifier of the objectivefinal String
int
the rows of the library that will be checked by the objective -
Constructor Summary
ConstructorsConstructorDescriptionCommonObjective
(Strategy algo, int identify) normal constructor for this type of objects -
Method Summary
-
Field Details
-
algorithm
the algorithm chosen, related to the specific common objective -
id
public final int idthe unique identifier of the objective -
imagePath
-
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
-
CommonObjective
normal constructor for this type of objects- Parameters:
algo
- the algorithm used, depends on the objective chosenidentify
- the unique identifier of this objective
-
-
Method Details
-
draw
public void draw(int points) method that draws this objective- Parameters:
points
- the points still available for this objective
-
draw
public void draw()placeholder function, which will be overwritten by the subclasses, it draws itself
-