From c5eb73ef4bdef3922dc05bd9dcb296c358abd84f Mon Sep 17 00:00:00 2001 From: Oliver Akins Date: Sun, 13 Mar 2022 18:31:25 -0600 Subject: [PATCH] Add the game's status to the object --- server/src/objects/Game.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/server/src/objects/Game.ts b/server/src/objects/Game.ts index 885a350..f98b52a 100644 --- a/server/src/objects/Game.ts +++ b/server/src/objects/Game.ts @@ -11,14 +11,17 @@ export class Game { readonly host: Player; readonly log: Logger; - private _deck: Deck; - private board: (Player|null)[]; + private _status: string; private _players: Player[]; + private _deck: Deck; + private board: (Player|null)[]; constructor(host: Player) { + this._status = `lobby`; + // Setup the board this.board = new Array(55).fill(null); this.board[26] = null; @@ -58,6 +61,9 @@ export class Game { }; + /** The current status of the game */ + get status() { return this._status; } + /** The deck of the fuel cards */ get deck() { return this._deck; };