Fix: output

This commit is contained in:
2026-04-29 17:48:16 +02:00
parent 73b5b6eba5
commit 6cb0564761
2 changed files with 5 additions and 6 deletions
@@ -28,21 +28,20 @@ public class ClientLauncherTUI {
if (networkType == 0) { if (networkType == 0) {
RMIClient client = new RMIClient("localhost", 1099); RMIClient client = new RMIClient("localhost", 1099);
if (client.connect(username, proposedNumPlayers, controller)) { if (client.connect(username, proposedNumPlayers, controller)) {
System.out.println("CLIENT CONNESSO DAJE"); System.out.println("Succesfully connected to RMI server\n\n");
} else { } else {
System.out.println("NON CONNESSO D:"); System.out.println("RMI connection refused\n\n");
} }
while(true) { while(true) {
System.out.flush(); System.out.flush();
if (controller.localModel!=null) { if (controller.localModel!=null) {
System.out.println("MODEL SETTATO"); break;
} }
Thread.sleep(500); Thread.sleep(500);
} }
System.out.println("Model set\n\n");
@@ -134,7 +134,7 @@ public class ServerLauncher {
*/ */
public void run() throws InterruptedException, RemoteException { public void run() throws InterruptedException, RemoteException {
// Game creation // Game creation
System.out.println("NOTIFICO MODEL"); System.out.println("\n\nNotifying model");
serverRMI.notifyAll(gameController.getModel()); serverRMI.notifyAll(gameController.getModel());
serverTCP.notifyAll(gameController.getModel()); serverTCP.notifyAll(gameController.getModel());