Add: TUI for server (debug)
This commit is contained in:
@@ -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<String> 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;
|
||||
|
||||
Reference in New Issue
Block a user