feat: good leaderboard

This commit is contained in:
2025-02-01 00:09:25 +01:00
parent a160042ef4
commit a5c046f891
6 changed files with 74 additions and 11 deletions

View File

@@ -85,7 +85,7 @@ public class ClientConnexion extends Connexion {
public void visitPacket(UpdatePlayerScorePacket packet) {
Player player = this.client.getGame().getPlayerById(packet.getPlayerId());
assert(player != null);
player.setScore(packet.getCellsLeft());
this.client.getGame().setPlayerScore(player, packet.getCellsLeft());
System.out.println("Score for " + player.getPseudo() + " : " + packet.getCellsLeft());
}