diff --git a/src/utils/Game.ts b/src/utils/Game.ts index bea6c2c..0930fba 100644 --- a/src/utils/Game.ts +++ b/src/utils/Game.ts @@ -28,4 +28,11 @@ class Game { }; return `Game(code=${this.code},players=${players.join(',')})`; }; + + public toJSON(): string { + return JSON.stringify({ + code: this.code, + players: this.#_players, + }, undefined, `\t`) + }; }; \ No newline at end of file