Show garbage received on player elimination
- Add garbageReceived array to player objects - Track garbage in addGarbageToPlayer() with sender name - Include garbageReceived in getStates() output - Update endGame() to pass garbage stats to UI - Update showGameOver() to display garbage count per player - Add CSS styling for eliminated players and garbage column - Bump CSS version for cache refresh Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
+6
-2
@@ -214,11 +214,15 @@ function endGame(states) {
|
||||
winner = winnerPlayer.name;
|
||||
}
|
||||
|
||||
// Build scores list
|
||||
// Build scores list with garbage info
|
||||
Object.values(states).forEach(state => {
|
||||
const player = network.getPlayer(state.playerId);
|
||||
if (player) {
|
||||
scores[player.name] = state.score;
|
||||
scores[player.name] = {
|
||||
score: state.score,
|
||||
garbageReceived: (state.garbageReceived || []).length,
|
||||
eliminated: state.eliminated
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user