Add backend

This commit is contained in:
schmelczerandras 2020-10-04 19:05:32 +02:00
parent 4ad60813c9
commit 0f0a1eaf67
19 changed files with 355 additions and 45 deletions

View file

@ -0,0 +1,13 @@
import { Player } from './player';
export class PlayerContainer {
private socketIdToPlayer = new Map<string, Player>();
public addPlayer(player: Player) {
this.socketIdToPlayer.set(player.socketId, player);
}
public removePlayerBySocketId(socketId: string) {
this.socketIdToPlayer.delete(socketId);
}
}