Skip to content

GameHalfTurn

sealed class GameHalfTurn : Game

The possible states after GameNewTurn.play.

  • If the player has played all their remaining cards: GameFinished.

  • If the player was the first to play: GameNewTurn.

  • Otherwise, the player must select one of the previous cards on the table: GameSelectCard.

Inheritors

Properties

players

abstract val players: Set<Player>

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.

Functions

handOf

abstract fun handOf(player: Player): Hand

Returns the Hand (the cards) of player.

If player is not part of the game, an error is thrown.