Create Player object
This commit is contained in:
parent
eee45018c5
commit
e2ba845299
1 changed files with 13 additions and 0 deletions
13
server/src/objects/Player.ts
Normal file
13
server/src/objects/Player.ts
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
import { Socket } from "socket.io";
|
||||||
|
|
||||||
|
export class Player {
|
||||||
|
readonly name: string;
|
||||||
|
public socket: Socket;
|
||||||
|
readonly isHost: boolean;
|
||||||
|
|
||||||
|
constructor(name: string, socket: Socket, isHost=false) {
|
||||||
|
this.name = name;
|
||||||
|
this.socket = socket;
|
||||||
|
this.isHost = isHost;
|
||||||
|
};
|
||||||
|
};
|
||||||
Loading…
Add table
Add a link
Reference in a new issue