Skip to content

Commit

Permalink
fix game result for variant parallel
Browse files Browse the repository at this point in the history
  • Loading branch information
merowin committed Jan 2, 2024
1 parent 1c2996d commit 875dffe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/shared/src/variants/parallel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,11 @@ export class ParallelGo extends AbstractGame<
this.playerParticipation[player].dropOutAtRound = this.numberOfRounds;

if (this.nextToPlay().length < 2) {
this.phase = 'gameover';
if (this.nextToPlay().length === 1) {
this.result = `Player ${this.nextToPlay()[0]} wins!`;
}

this.phase = 'gameover';
return
}
}
Expand Down

0 comments on commit 875dffe

Please sign in to comment.