Skip to content

Commit b5cbb06

Browse files
committed
task update
1 parent 6e0aa3f commit b5cbb06

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

packages/api/src/commands/OnPrepareRoundCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export class OnPrepareRoundCommand extends Command<CountryRoom, {}> {
1717
this.state.state = ROUND_PREPARE_STATE
1818
this.state.rounds += 1
1919

20-
//this.state.blacklist.push(this.state.country.id)
20+
this.state.blacklist.push(this.state.country.id)
2121

2222
this.clock.setTimeout(async () => {
2323
await this.room.dispatcher.dispatch(new OnStartRoundCommand())

packages/api/src/commands/OnStartRoundCommand.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,14 @@ export class OnStartRoundCommand extends Command<CountryRoom | PartyRoom, {}> {
2525

2626
let countdown = this.clock.setInterval(() => {
2727
if (this.state.timer > 0) this.state.timer -= 1
28-
if (this.state.timer <= 0){
29-
// countdown.clear();
30-
this.state.timer = 15;
28+
if (this.state.timer < 0){
29+
countdown.clear();
3130
}
3231
}, 1000)
3332

3433
this.room.roundTimer = this.clock.setTimeout(() => {
35-
//countdown.clear()
36-
this.state.timer = 15;
37-
//this.room.dispatcher.dispatch(new OnEndRoundCommand())
34+
countdown.clear()
35+
this.room.dispatcher.dispatch(new OnEndRoundCommand())
3836
}, this.state.roundTime * 1000) as any
3937
}
4038
}

0 commit comments

Comments
 (0)