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;