MCPcopy Create free account
hub / github.com/code100x/chess / removeUser

Method removeUser

apps/ws/src/GameManager.ts:38–46  ·  view source on GitHub ↗
(socket: WebSocket)

Source from the content-addressed store, hash-verified

36 }
37
38 removeUser(socket: WebSocket) {
39 const user = this.users.find((user) => user.socket === socket);
40 if (!user) {
41 console.error('User not found?');
42 return;
43 }
44 this.users = this.users.filter((user) => user.socket !== socket);
45 socketManager.removeUser(user);
46 }
47
48 removeGame(gameId: string) {
49 this.games = this.games.filter((g) => g.gameId !== gameId);

Callers 1

index.tsFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected