Add opponent-turn class to status message in renderGame
The status was set without a type class in renderGame(), overriding the styled version from updateStatusFromGameState() on every state update. Now the purple background shows consistently for opponent turns. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
53abde53ac
commit
10825e8b82
@ -3807,7 +3807,7 @@ class GolfGame {
|
|||||||
: this.gameState.current_player_id;
|
: this.gameState.current_player_id;
|
||||||
const displayedPlayer = this.gameState.players.find(p => p.id === displayedPlayerId);
|
const displayedPlayer = this.gameState.players.find(p => p.id === displayedPlayerId);
|
||||||
if (displayedPlayer && displayedPlayerId !== this.playerId) {
|
if (displayedPlayer && displayedPlayerId !== this.playerId) {
|
||||||
this.setStatus(`${displayedPlayer.name}'s turn`);
|
this.setStatus(`${displayedPlayer.name}'s turn`, 'opponent-turn');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update player header (name + score like opponents)
|
// Update player header (name + score like opponents)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user