Add a cleanup method stub on the game manager

This commit is contained in:
Oliver Akins 2022-03-08 13:24:49 -06:00
parent 96d6e0b503
commit f4396a1c42
No known key found for this signature in database
GPG key ID: 3C2014AF9457AF99

View file

@ -22,6 +22,15 @@ export class GameDB {
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 */
public get count() {
return Object.keys(this.games).length;