public static void main(String[] args) {

        Thread gameLogic = new Thread(new UpdateThread());
        gameLogic.start();

        try {
            datagramSocket = new DatagramSocket(1337);
            System.out.println("Sever online on Port 1337");
        } catch (SocketException e) {
            System.err.print("Could not Create Socket on Port 1337. Maybe there is a Server running at that Port.");
            System.exit(1);
        }

        while (!shutdown) {
            byte[] buffer = new byte[1024];
            DatagramPacket packet = new DatagramPacket(buffer, buffer.length);
            try {
                datagramSocket.receive(packet);
            } catch (IOException e) {
                System.err.print("Could not receive the Packet from the Client correct");
                System.exit(1);
            }

            String packetData = new String(packet.getData()).trim();
            int packetid = Integer.parseInt(packetData.substring(0,1));
            int port = packet.getPort();
            InetAddress address = packet.getAddress();

            switch(packetid){
                case(0):
                    new Connect00(address,port,packetData.substring(2));
                    break;
                case(1):
                    new Disconnect01(address,port);
                    break;
                case(2):
                    new Move02(address,port,packetData.substring(2));
                    break;
                case(3):
                    new Shoot03(address,port,packetData.substring(2));
            }

        }
    }