Add a host flag

This commit is contained in:
Oliver Akins 2022-06-23 13:46:45 -06:00
parent 1f6c72ee8a
commit abba594522
No known key found for this signature in database
GPG key ID: 3C2014AF9457AF99

View file

@ -8,11 +8,14 @@ export class Player {
public ship: ISpaceship; public ship: ISpaceship;
public colour: IColour; public colour: IColour;
public readonly host: boolean;
constructor(socket: Socket, data: PlayerData) { constructor(socket: Socket, data: PlayerData) {
this.name = data.name; this.name = data.name;
this._socket = socket this._socket = socket
this.ship = data.ship; this.ship = data.ship;
this.colour = data.colour; this.colour = data.colour;
this.host = data.host;
}; };
@ -35,6 +38,7 @@ export class Player {
name: this.name, name: this.name,
ship: this.ship, ship: this.ship,
colour: this.colour, colour: this.colour,
host: this.host,
}; };
}; };
}; };