diff --git a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/NetworkSupport.java b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/NetworkSupport.java index 6ae24fd..40897de 100644 --- a/Projekte/monopoly/client/src/main/java/pp/monopoly/client/NetworkSupport.java +++ b/Projekte/monopoly/client/src/main/java/pp/monopoly/client/NetworkSupport.java @@ -41,6 +41,11 @@ public class NetworkSupport implements MessageListener, ClientStateListe return app; } + public int getId() { + if (client == null) return 0; + return client.getId(); + } + /** * Checks if there is a connection to the game server. * @@ -80,7 +85,7 @@ public class NetworkSupport implements MessageListener, ClientStateListe * @param port The server's port. * @throws IOException If an I/O error occurs when creating the client. */ - void initNetwork(String host, int port) throws IOException { + public void initNetwork(String host, int port) throws IOException { if (client != null) { throw new IllegalStateException("Already connected to the game server."); }