강동현

Merge branch 'bugfix/prevent-ingame-join' into develop

...@@ -102,7 +102,11 @@ export class Room { ...@@ -102,7 +102,11 @@ export class Room {
102 } 102 }
103 103
104 public connect(user: User): void { 104 public connect(user: User): void {
105 - if (this.users.includes(user) || this.users.length >= this.maxUsers) { 105 + if (
106 + this.users.includes(user) ||
107 + this.users.length >= this.maxUsers ||
108 + this.game
109 + ) {
106 return; 110 return;
107 } 111 }
108 112
......
...@@ -16,6 +16,8 @@ export class DummySocket implements SocketWrapper { ...@@ -16,6 +16,8 @@ export class DummySocket implements SocketWrapper {
16 16
17 public setDisconnectHandler(handler: () => void) {} 17 public setDisconnectHandler(handler: () => void) {}
18 18
19 + public setPingHandler(handler: () => void) {}
20 +
19 public send(raw: RawMessage): void { 21 public send(raw: RawMessage): void {
20 this.receivedMessages.push(raw); 22 this.receivedMessages.push(raw);
21 } 23 }
...@@ -43,4 +45,8 @@ export class DummySocket implements SocketWrapper { ...@@ -43,4 +45,8 @@ export class DummySocket implements SocketWrapper {
43 public notReceived<T extends ServerOutboundMessageKey>(key: T): void { 45 public notReceived<T extends ServerOutboundMessageKey>(key: T): void {
44 expect(this.findMessageIndex(key) === -1).eq(true); 46 expect(this.findMessageIndex(key) === -1).eq(true);
45 } 47 }
48 +
49 + public sendPing(): void {
50 + // TODO
51 + }
46 } 52 }
......