diff --git a/server/src/objects/Player.ts b/server/src/objects/Player.ts index 9e0a6da..c7eb752 100644 --- a/server/src/objects/Player.ts +++ b/server/src/objects/Player.ts @@ -28,4 +28,13 @@ export class Player { throw Error("Cannot overwrite a player's socket that is connected."); }; }; + + /** The properties of the Player object without any of the methods. */ + public json() { + return { + name: this.name, + ship: this.ship, + colour: this.colour, + }; + }; }; \ No newline at end of file