v0.8.2

Class: GameManager

Table of contents

Constructors

Methods

Constructors

constructor

• new GameManager(eventBus, tableFactory): GameManager

Parameters

Name Type
eventBus EventBus
tableFactory TableFactory

Returns

GameManager

Methods

getAllTables

▸ getAllTables(): Table[]

Gets all tables in the game manager.

Returns

Table[]

An array of all tables.


getAvailableGames

▸ getAvailableGames(): GameDefinition[]

Gets all available games.

Returns

GameDefinition[]

An array of all game definitions.


getGameDefinition

▸ getGameDefinition(gameId): undefined | GameDefinition

Gets a game definition by its ID.

Parameters

Name Type Description
gameId string The ID of the game

Returns

undefined | GameDefinition

The game definition, or undefined if not found


getTablesForGame

▸ getTablesForGame(gameId): Table[]

Gets all tables for a game.

Parameters

Name Type Description
gameId string The ID of the game.

Returns

Table[]

An array of tables for the game.


registerGame

▸ registerGame(gameDefinition): void

Registers a game definition.

Parameters

Name Type Description
gameDefinition GameDefinition The game definition to register.

Returns

void


removeTable

▸ removeTable(tableId): void

Removes a table from the game manager.

Parameters

Name Type Description
tableId string The ID of the table to remove.

Returns

void


unregisterGame

▸ unregisterGame(gameId): void

Unregisters a game definition.

Parameters

Name Type Description
gameId string The ID of the game to unregister.

Returns

void