0
0
Fork 0

Allow player socket to be null

This commit is contained in:
Oliver-Akins 2021-01-07 12:34:56 -07:00
parent a982ccd704
commit 00d2262663

View file

@ -4,10 +4,10 @@ export class Player {
readonly name: string; readonly name: string;
public team: team|null = null; public team: team|null = null;
public role: role|null = null; public role: role|null = null;
public socket: Socket; public socket: Socket|null;
readonly isHost: boolean; readonly isHost: boolean;
constructor(name: string, socket: Socket, isHost=false) { constructor(name: string, socket: Socket|null=null, isHost=false) {
this.name = name; this.name = name;
this.socket = socket; this.socket = socket;
this.isHost = isHost; this.isHost = isHost;