修改队伍的设置方式
This commit is contained in:
parent
19d6d2b741
commit
f038fba3cb
@ -12,7 +12,7 @@ export class OnJoinCommand extends Command<CardGameState, {
|
||||
client: Client
|
||||
}> {
|
||||
execute({client} = this.payload) {
|
||||
let team = this.state.players.size / 2 | 0;
|
||||
let team = (this.state.players.size == 1 || this.state.players.size == 2)? 1 : 0;
|
||||
// 实际的team会在PlayReadyCommand中设置
|
||||
let player = new Player(client.sessionId, 0, team);
|
||||
this.state.players.set(client.sessionId, player);
|
||||
|
Loading…
x
Reference in New Issue
Block a user