fix: score display
All checks were successful
Linux arm64 / Build (push) Successful in 28s

This commit is contained in:
2025-02-01 12:54:11 +01:00
parent 02089c649b
commit f22debdf5f
6 changed files with 20 additions and 17 deletions

View File

@@ -22,9 +22,12 @@ public class LeaderboardRenderer {
private final ImVec4 cellColorEnemy = new ImVec4(1.0f, 0.0f, 0.0f, 0.5f);
private final int maxPlayersShowed = 2;
private final int emptyCellCount;
public LeaderboardRenderer(Game game, Player player) {
this.game = game;
this.currentPlayer = player;
this.emptyCellCount = game.getDoku().getEmptyCells().size();
}
private void renderRank(int rank) {
@@ -48,7 +51,7 @@ public class LeaderboardRenderer {
ImGui.sameLine();
renderName(player.getPseudo());
ImGui.sameLine();
renderScore(player.getScore());
renderScore(emptyCellCount - player.getRemainingCells());
ImGui.endChild();
ImGui.popStyleColor(3);
}