Skip to main content

Class: GameManager<G, P>

Game manager is used to coordinate other classes, the Game, the Player's, the Action's and the Flow.

Type parameters

NameType
Gextends BaseGame = BaseGame
Pextends BasePlayer = BasePlayer

Properties

players

players: PlayerCollection<P>

The players in this game. See Player

Defined in

boardzilla-core/src/game-manager.ts:79


game

game: G

The game. See Game

Defined in

boardzilla-core/src/game-manager.ts:83


phase

phase: "new" | "finished" | "started" = 'new'

Current game phase

Defined in

boardzilla-core/src/game-manager.ts:90


godMode

godMode: boolean = false

If true, allows any piece to be moved or modified in any way. Used only during development.

Defined in

boardzilla-core/src/game-manager.ts:100

Methods

setSettings

setSettings(settings): void

configuration functions

Parameters

NameType
settingsRecord<string, any>

Returns

void

Defined in

boardzilla-core/src/game-manager.ts:114


getAction

getAction(name, player): Action<{}> & { name: string }

action functions

Parameters

NameType
namestring
playerP

Returns

Action<{}> & { name: string }

Defined in

boardzilla-core/src/game-manager.ts:318