diff --git a/core/src/netwerkprog/game/client/Client.java b/core/src/netwerkprog/game/client/Client.java index 1ad80d4..9ce9e80 100644 --- a/core/src/netwerkprog/game/client/Client.java +++ b/core/src/netwerkprog/game/client/Client.java @@ -6,15 +6,14 @@ import java.io.IOException; import java.net.Socket; import java.util.Scanner; -public class Client { +public class Client extends Thread{ private int port; private String hostname; private boolean isConnected = true; - public static void main(String[] args) { - Client client = new Client("localhost",8000); - client.connect(); - + @Override + public void run() { + this.connect(); } public Client(String hostname, int port) { diff --git a/core/src/netwerkprog/game/server/Server.java b/core/src/netwerkprog/game/server/Server.java index 9a48244..063931b 100644 --- a/core/src/netwerkprog/game/server/Server.java +++ b/core/src/netwerkprog/game/server/Server.java @@ -15,7 +15,7 @@ import java.util.HashMap; public class Server { private ServerSocket serverSocket; - private static final int PORT = 8000; + public static final int PORT = 8000; private ArrayList clients = new ArrayList<>(); private HashMap clientThreads = new HashMap<>();