Add a host flag
This commit is contained in:
parent
1f6c72ee8a
commit
abba594522
1 changed files with 4 additions and 0 deletions
|
|
@ -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,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
Loading…
Add table
Add a link
Reference in a new issue