feat(SCOPONE-0002): rotate starting player clockwise each round
This commit is contained in:
@@ -1301,9 +1301,10 @@ export class GameScene extends Phaser.Scene {
|
||||
private startNewRound(): void {
|
||||
const totals = this.state.teamScores.map(t => t.totalPoints);
|
||||
const nextRound = (this.state.roundNumber ?? 1) + 1;
|
||||
const startingPlayer = ((nextRound - 1) % 4) as PlayerIndex;
|
||||
for (const img of this.cardImages.values()) img.destroy();
|
||||
this.cardImages.clear();
|
||||
this.state = createInitialState();
|
||||
this.state = createInitialState(startingPlayer);
|
||||
this.state.teamScores[0].totalPoints = totals[0];
|
||||
this.state.teamScores[1].totalPoints = totals[1];
|
||||
this.state.roundNumber = nextRound;
|
||||
|
||||
Reference in New Issue
Block a user