修改情况map的方法

This commit is contained in:
zhl 2020-12-14 21:03:04 +08:00
parent 5f37ab604e
commit 2312f11b50

View File

@ -43,7 +43,9 @@ export class DiscardCommand extends Command<CardGameState, { client: Client, car
client && client.send('discard_card_s2c', {errcode: 4, errmsg: '出牌不符合规则'});
return;
}
this.state.cards.clear();
for (let [key, val] of this.state.cards) {
this.state.cards.delete(key);
}
//停止出牌计时, 并更新player.extraTime;
let elapsedTime = this.room.stopSchedule('draw_card');
if (elapsedTime >= 0) {