feat: multi synced player scores
All checks were successful
Linux arm64 / Build (push) Successful in 31s

This commit is contained in:
2025-01-30 22:16:29 +01:00
parent bcded60fbe
commit 25c2270a37
19 changed files with 264 additions and 22 deletions

View File

@@ -4,6 +4,7 @@ import gui.SudokuRenderer;
import imgui.ImGui;
import network.client.Client;
import network.server.Server;
import sudoku.structure.Cell;
public class MultiPlayerDokuView extends BaseView{
@@ -16,9 +17,14 @@ public class MultiPlayerDokuView extends BaseView{
this.client = client;
this.server = server;
this.sudokuRenderer = new SudokuRenderer(this.client.getGame().getDoku());
this.sudokuRenderer.onCellChange.connect(this::onCellChange);
this.client.onDisconnect.connect(this::onDisconnect);
}
private void onCellChange(Cell cell) {
this.client.sendCellChange(cell);
}
public void onDisconnect() {
if (server == null) {
closeMenu();