Add a cleanup method stub on the game manager
This commit is contained in:
parent
96d6e0b503
commit
f4396a1c42
1 changed files with 9 additions and 0 deletions
|
|
@ -22,6 +22,15 @@ export class GameDB {
|
||||||
this.games[game.id] = game;
|
this.games[game.id] = game;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This removes all inactive games from the system, this includes any games
|
||||||
|
* that do not have any currently connected players and are in the lobby
|
||||||
|
* state. This will not remove any games that are currently in-progress so
|
||||||
|
* that players can resume the game later if they happened to all get
|
||||||
|
* disconnected for some reason.
|
||||||
|
*/
|
||||||
|
public cleanup(): void {};
|
||||||
|
|
||||||
/** Returns a count of how many games currently exist in the database */
|
/** Returns a count of how many games currently exist in the database */
|
||||||
public get count() {
|
public get count() {
|
||||||
return Object.keys(this.games).length;
|
return Object.keys(this.games).length;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue