Class OrderPlayer
java.lang.Object
it.polimi.ingsw.gc14.Model.Orders.OrderPlayer
- All Implemented Interfaces:
Serializable
Represents a player entry in an order logic card.
Each entry stores the player and whether that player has already performed an action in the current order sequence.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionOrderPlayer(Player player, boolean played) Creates an order entry for the specified player. -
Method Summary
Modifier and TypeMethodDescriptionReturns the player associated with this order entry.booleanisPlayed()Returns whether the player has already played in this order sequence.voidMarks this player as having played in the current order sequence.toString()Returns a string containing the player's username and whether the player has already played.
-
Field Details
-
player
The player associated with this order entry. -
played
private boolean playedIndicates whether the player has already played.
-
-
Constructor Details
-
OrderPlayer
Creates an order entry for the specified player.- Parameters:
player- the player associated with this order entry.played-trueif the player has already played;falseotherwise.
-
-
Method Details
-
getPlayer
-
isPlayed
public boolean isPlayed()Returns whether the player has already played in this order sequence.- Returns:
trueif the player has played;falseotherwise.
-
markAsPlayed
public void markAsPlayed()Marks this player as having played in the current order sequence. -
toString
-