Interface TurnState

interface TurnState {
    cardsDiscardedThisTurn: number;
    cardsPlayedOrDiscardedThisTurn: number;
    cluesGivenThisTurn: number;
    currentPlayerIndex: null | PlayerIndex;
    endTurnNum: null | number;
    playOrderInverted: boolean;
    segment: null | number;
    turnNum: number;
}

Properties

cardsDiscardedThisTurn: number
cardsPlayedOrDiscardedThisTurn: number
cluesGivenThisTurn: number
currentPlayerIndex: null | PlayerIndex

Initialized to the starting player index. If this is null, it signifies that the game is over and will prevent any name frames from being highlighted on subsequent segments.

endTurnNum: null | number
playOrderInverted: boolean
segment: null | number

"segment" mostly corresponds to the turn, with some exceptions:

  1. Some Detrimental Characters can take two actions, and each action should be on a separate replay segment.
  2. The server sends the total amount of time that each player took at the end of the game; this should exist on a separate replay segment to avoid cluttering the final action of the game.

The client makes a copy of the entire game state whenever "segment" changes.

This is null when dealing the initial cards, then set to 0.

turnNum: number