From fe621d3a3cf200b6ce5364681ec054b0bd0431f8 Mon Sep 17 00:00:00 2001 From: AleandroPagani Date: Sat, 2 May 2026 16:11:32 +0200 Subject: [PATCH] Add: TUI for server (debug) --- src/main/java/it/polimi/ingsw/gc14/ServerLauncher.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/it/polimi/ingsw/gc14/ServerLauncher.java b/src/main/java/it/polimi/ingsw/gc14/ServerLauncher.java index 9c8a10e..252a9da 100644 --- a/src/main/java/it/polimi/ingsw/gc14/ServerLauncher.java +++ b/src/main/java/it/polimi/ingsw/gc14/ServerLauncher.java @@ -7,6 +7,7 @@ import it.polimi.ingsw.gc14.Network.NetworkEvent; import it.polimi.ingsw.gc14.Network.NetworkEvents.AddPlayer; import it.polimi.ingsw.gc14.Network.RMI.Server.RMIServer; import it.polimi.ingsw.gc14.Network.TCP.Server.TCPServer; +import it.polimi.ingsw.gc14.View.TUI.TUI; import java.rmi.RemoteException; import java.util.concurrent.BlockingQueue; @@ -56,6 +57,8 @@ public class ServerLauncher { */ static LimitedList playerList; + TUI view; + /** * Class constructor that initializes the attributes. @@ -137,11 +140,14 @@ public class ServerLauncher { System.out.println("\n\nNotifying model"); serverRMI.notifyAll(gameController.getModel()); serverTCP.notifyAll(gameController.getModel()); + this.view = new TUI(gameController.getModel()); + this.view.fullRender(); // Game execution while (true) { try { this.doFirstEvent(); + this.view.fullRender(); } catch (InterruptedException e) { Thread.currentThread().interrupt(); break;