Add: first implementation of ServerLauncher

This commit is contained in:
2026-04-24 11:30:43 +02:00
parent ce6f656b17
commit e2b51fd914
3 changed files with 69 additions and 5 deletions
@@ -63,17 +63,17 @@ public class RMIServer implements IGameServer {
// Metodi interni del server
private void notifyAll(NetworkEvent action) throws RemoteException {
public void notifyAll(NetworkEvent action) throws RemoteException {
for (IClientCallback cb : clients.values()) {
cb.onAction(action);
}
}
private void notifyAll(Game model) throws RemoteException {
public void notifyAll(Game model) throws RemoteException {
for (IClientCallback cb : clients.values()) {
cb.onGameInit(model);
}
}
private void notifyError(String username, String message) throws RemoteException {
public void notifyError(String username, String message) throws RemoteException {
IClientCallback cb = clients.get(username);
if (cb != null) cb.onError(message);
}
@@ -80,7 +80,7 @@ public class TCPServer {
}
}
private TCPServer(GameController gameController, int port){
public TCPServer(GameController gameController, int port){
this.port = port;
this.gameController = gameController;
}