From 08a01f8b8e4a0a0dd6f216de4b3a9b851b46d35a Mon Sep 17 00:00:00 2001 From: zhl Date: Fri, 7 May 2021 17:12:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B6=E5=88=B0=E7=BB=93=E6=9D=9F=E6=B8=B8?= =?UTF-8?q?=E6=88=8F=E7=9A=84=E6=B6=88=E6=81=AF=E5=90=8E,=20=E5=B0=86?= =?UTF-8?q?=E6=88=BF=E9=97=B4=E8=AE=BE=E7=BD=AE=E4=B8=BAlock?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/rooms/commands/EndGameCommand.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/rooms/commands/EndGameCommand.ts b/src/rooms/commands/EndGameCommand.ts index eaa19d1..aae1e16 100644 --- a/src/rooms/commands/EndGameCommand.ts +++ b/src/rooms/commands/EndGameCommand.ts @@ -9,5 +9,7 @@ export class EndGameCommand extends Command { async execute() { this.state.updateGameState(GameStateConst.STATE_GAME_OVER) this.room.broadcast('endgame', {}) + await this.room.setPrivate(true) + await this.room.lock() } }