java.lang.Object
it.polimi.ingsw.model.Turn
public class Turn
extends java.lang.Object
A container for a player turn
During each turn, the currentPlayer performs its actions based on the loaded strategy
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description TurnData
buildDataClass()
Creates a TurnData object based on this turnTurn
cloneTurn(Game game)
Creates a clone of this objectPlayer
getCurrentPlayer()
currentTurn getterRuleSetStrategy
getRuleSetStrategy()
ruleSetStrategy getterint
getTurnNumber()
turnNumber getter
-
Constructor Details
-
Turn
Default constructor- Parameters:
turnNumber
- the turn numbercurrentPlayer
- the player playing in this turn
-
-
Method Details
-
cloneTurn
Creates a clone of this object- Parameters:
game
- the game in which the turn was played- Returns:
- a clone of the turn
-
getTurnNumber
public int getTurnNumber()turnNumber getter- Returns:
- the turn number
-
getCurrentPlayer
currentTurn getter- Returns:
- the current player
-
getRuleSetStrategy
ruleSetStrategy getter- Returns:
- the turn's strategy
-
buildDataClass
Creates a TurnData object based on this turn- Returns:
- this object's data class
-