Add a status indicator to Game objects
This commit is contained in:
parent
22a76984eb
commit
b842d9f8bc
1 changed files with 3 additions and 1 deletions
|
|
@ -1,10 +1,12 @@
|
|||
class Game {
|
||||
readonly code: string;
|
||||
public status: string;
|
||||
#players: players;
|
||||
|
||||
public constructor(code: string, host: string) {
|
||||
this.code = code;
|
||||
this.#players = {};
|
||||
this.status = `lobby`;
|
||||
this.add_player(host, true);
|
||||
};
|
||||
|
||||
|
|
@ -36,7 +38,7 @@ class Game {
|
|||
}, undefined, `\t`)
|
||||
};
|
||||
|
||||
public static fromJSON(data: string): Game {
|
||||
public static fromJSON(data: string): void {
|
||||
let db: database = JSON.parse(data) as database;
|
||||
};
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue