diff --git a/src/rooms/commands/DiscardCommand.ts b/src/rooms/commands/DiscardCommand.ts index a63152d..cfe1ed4 100644 --- a/src/rooms/commands/DiscardCommand.ts +++ b/src/rooms/commands/DiscardCommand.ts @@ -8,6 +8,7 @@ import {singleton} from "../../common/Singleton"; import {GameEnv} from "../../cfg/GameEnv"; import {debugRoom} from "../../common/Debug"; import {TurnEndCommand} from "./TurnEndCommand"; +import {Card} from "../schema/Card"; /** * 出牌 @@ -72,6 +73,8 @@ export class DiscardCommand extends Command { - execute({client}: { client: Client }) { + async execute({client}: { client: Client }) { this.state.players.get(client.sessionId).state = PlayerStateConst.PLAYER_READY; this.room.broadcast("player_ready_s2c", {player: client.sessionId}, {except: client}); let readyCount = 0; @@ -24,6 +24,7 @@ export class PlayReadyCommand extends Command= this.room.maxClients) { // 比大小, 确定先手 // return [new PrepareCommand()]; + await this.room.setPrivate(true); this.room.state.gameState = GameStateConst.CHANGE_HERO; }