강동현

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

......@@ -102,7 +102,11 @@ export class Room {
}
public connect(user: User): void {
if (this.users.includes(user) || this.users.length >= this.maxUsers) {
if (
this.users.includes(user) ||
this.users.length >= this.maxUsers ||
this.game
) {
return;
}
......
......@@ -16,6 +16,8 @@ export class DummySocket implements SocketWrapper {
public setDisconnectHandler(handler: () => void) {}
public setPingHandler(handler: () => void) {}
public send(raw: RawMessage): void {
this.receivedMessages.push(raw);
}
......@@ -43,4 +45,8 @@ export class DummySocket implements SocketWrapper {
public notReceived<T extends ServerOutboundMessageKey>(key: T): void {
expect(this.findMessageIndex(key) === -1).eq(true);
}
public sendPing(): void {
// TODO
}
}
......