Add the game's status to the object
This commit is contained in:
parent
4c9d0b272c
commit
c5eb73ef4b
1 changed files with 8 additions and 2 deletions
|
|
@ -11,14 +11,17 @@ export class Game {
|
||||||
readonly host: Player;
|
readonly host: Player;
|
||||||
|
|
||||||
readonly log: Logger;
|
readonly log: Logger;
|
||||||
private _deck: Deck<FuelCard>;
|
|
||||||
|
|
||||||
private board: (Player|null)[];
|
private _status: string;
|
||||||
private _players: Player[];
|
private _players: Player[];
|
||||||
|
private _deck: Deck<FuelCard>;
|
||||||
|
private board: (Player|null)[];
|
||||||
|
|
||||||
|
|
||||||
constructor(host: Player) {
|
constructor(host: Player) {
|
||||||
|
|
||||||
|
this._status = `lobby`;
|
||||||
|
|
||||||
// Setup the board
|
// Setup the board
|
||||||
this.board = new Array(55).fill(null);
|
this.board = new Array(55).fill(null);
|
||||||
this.board[26] = 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 */
|
/** The deck of the fuel cards */
|
||||||
get deck() { return this._deck; };
|
get deck() { return this._deck; };
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue