Package it.polimi.ingsw.model
Class Strategy
java.lang.Object
it.polimi.ingsw.model.Strategy
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
Algo_CO_1,Algo_CO_10,Algo_CO_11,Algo_CO_12,Algo_CO_2,Algo_CO_3,Algo_CO_4,Algo_CO_5,Algo_CO_6,Algo_CO_7,Algo_CO_8,Algo_CO_9
class which formalize the Strategy Pattern. Immutable
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckMatch(Card[][] board) check if the objective is achieved by the player library
-
Field Details
-
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
-
Strategy
public Strategy()
-
-
Method Details
-
checkMatch
check if the objective is achieved by the player library- Parameters:
board- the state of the library- Returns:
- true iff the objective is achieved
-