收到结束游戏的消息后, 将房间设置为lock

This commit is contained in:
zhl 2021-05-07 17:12:28 +08:00
parent ba570be9ff
commit 08a01f8b8e

View File

@ -9,5 +9,7 @@ export class EndGameCommand extends Command<PuzzleGameState, {}> {
async execute() {
this.state.updateGameState(GameStateConst.STATE_GAME_OVER)
this.room.broadcast('endgame', {})
await this.room.setPrivate(true)
await this.room.lock()
}
}