GameSelectCard¶
data class GameSelectCard(
hands: Map<Player, Hand>,
val previousTable: Deck,
val newTable: Deck,
val currentPlayer: Player
) : GameHalfTurn
Game state where a player just placed cards on the table.
The player must select a card on the old table to insert into their own hand, by calling selectCard.
Constructors¶
GameSelectCard¶
Properties¶
currentPlayer¶
val currentPlayer: Player
newTable¶
players¶
The set of players in the game.
This set is immutable and ordered: the players will play in the order in which they appear in this set.
previousTable¶
val previousTable: Deck
The deck that was on the table before the current player played their cards.
Functions¶
handOf¶
selectCard¶
fun selectCard(card: Card): LegalMove<GameNewTurn>
The currentPlayer must select one of the cards on the previousTable.
The selected card will be added to their own hand.
After that, the previousTable is discarded and the next player's turn begins.