feat: uggly leaderboard
All checks were successful
Linux arm64 / Build (push) Successful in 27s

This commit is contained in:
2025-01-31 13:48:51 +01:00
parent 25c2270a37
commit a160042ef4
12 changed files with 61 additions and 14 deletions

View File

@@ -0,0 +1,25 @@
package gui.widget;
import game.Game;
import game.Player;
import imgui.ImGui;
public class LeaderboardRenderer {
private final Game game;
private final Player currentPlayer;
public LeaderboardRenderer(Game game, Player player) {
this.game = game;
this.currentPlayer = player;
}
public void render() {
ImGui.text("Leaderboard");
for (var entry : game.getPlayers().entrySet()) {
Player player = entry.getValue();
ImGui.text(player.getPseudo() + " : " + player.getScore());
}
}
}