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
| Name | Type |
|---|---|
G | extends BaseGame = BaseGame |
P | extends 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
| Name | Type |
|---|---|
settings | Record<string, any> |
Returns
void
Defined in
boardzilla-core/src/game-manager.ts:114
getAction
▸ getAction(name, player): Action<{}> & { name: string }
action functions
Parameters
| Name | Type |
|---|---|
name | string |
player | P |
Returns
Action<{}> & { name: string }