修改换卡逻辑
This commit is contained in:
parent
f67b2c3c9f
commit
68e69ba53d
@ -7,6 +7,7 @@ import { PlayerStateConst } from '../../constants/PlayerStateConst'
|
||||
import { GameEnv } from '../../cfg/GameEnv'
|
||||
import { GameStateConst } from '../../constants/GameStateConst'
|
||||
import { NextTurnCommand } from './NextTurnCommand'
|
||||
import { DiceNextTurnCommand } from './DiceNextTurnCommand'
|
||||
|
||||
/**
|
||||
* 开局换卡
|
||||
@ -52,9 +53,13 @@ export class ChangeCardCommand extends Command<CardGameState, { client: Client,
|
||||
}
|
||||
if (finishCount >= this.room.maxClients) {
|
||||
// TODO:: 根据 this.state.firstPlayer确定先手
|
||||
if (this.state.mode === 4) {
|
||||
// 正式开始游戏, 第一个玩家出牌
|
||||
this.state.updateGameState(GameStateConst.STATE_BEGIN_DRAW)
|
||||
return [new NextTurnCommand()]
|
||||
} else {
|
||||
return [new DiceNextTurnCommand()]
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user