import { Game, HelpSheet } from '@gecogvidanto/shared'; import ServerCharacter from './ServerCharacter'; import ServerSet from './ServerSet'; /** * A game coming from server. */ export default interface ServerGame extends Game { /** * The current running set. */ readonly currentSet: ServerSet; /** * The absolute current round for the whole game (including previous set rounds). */ readonly absoluteCurrentRound: number; /** * The players still on game (removing players who left the game). */ readonly onGamePlayers: ReadonlyArray; /** * Players which are either dying, leaving or at end of set, so for which results will be needed. */ readonly terminatingPlayers: ReadonlyArray; /** * The sets of the game. A fully played game should have at least 2 sets. */ readonly roundSets: ReadonlyArray; /** * The characters in the game. Each set, a player is playing a character from birth to death, but * death/rebirth will likely be in the middle of the set. There may also be non player characters. */ readonly characters: ReadonlyArray; /** * Add a non player character to the set. * * @returns The identifier of the NPC (always negative). */ addNonPlayerCharacter(): number; /** * Get the character for the given player in the current set. * * @param player - The player identifier, may be negative for a non-player character. */ getCharacterFor(player: number): ServerCharacter; /** * Build the help sheet for the values. */ buildValuesHelpSheet(): HelpSheet; }