From abba594522959595975656413efed1ae83a15848 Mon Sep 17 00:00:00 2001 From: Oliver Akins Date: Thu, 23 Jun 2022 13:46:45 -0600 Subject: [PATCH] Add a host flag --- server/src/objects/Player.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/src/objects/Player.ts b/server/src/objects/Player.ts index c7eb752..0ef2148 100644 --- a/server/src/objects/Player.ts +++ b/server/src/objects/Player.ts @@ -8,11 +8,14 @@ export class Player { public ship: ISpaceship; public colour: IColour; + public readonly host: boolean; + constructor(socket: Socket, data: PlayerData) { this.name = data.name; this._socket = socket this.ship = data.ship; this.colour = data.colour; + this.host = data.host; }; @@ -35,6 +38,7 @@ export class Player { name: this.name, ship: this.ship, colour: this.colour, + host: this.host, }; }; }; \ No newline at end of file