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