0
0
Fork 0

Begin implementing toJSON and fromJSON

This commit is contained in:
Oliver-Akins 2021-01-05 17:03:10 -07:00
parent 4b5a05f57b
commit 48c0f995d1

View file

@ -107,6 +107,20 @@ export class Game {
}; };
public toJSON() {
/**
* Returns a JSON representation of the game.
*/
let players = this.players.map(p => p.toJSON());
};
public static fromJSON() {
/**
* Converts a JSON object into a Game object
*/
};
public static generateID(length: number): string { public static generateID(length: number): string {
/** /**
* Generates a game code with the given length * Generates a game code with the given length