Skip to content

GameFinished

data class GameFinished(
    hands: Map<Player, Hand>, 
    val table: Deck, 
    val winner: Player
) : GameHalfTurn

Game state after a player has won.

Constructors

GameFinished

constructor(
    hands: Map<Player, Hand>, 
    table: Deck, 
    winner: Player
)

Properties

players

open override 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.

table

val table: Deck

winner

val winner: Player

Functions

handOf

open override fun handOf(player: Player): Hand

Returns the Hand (the cards) of player.

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