Beispiel #1
0
  public synchronized void start() {
    running = true;
    new Thread(this).start();

    if (JOptionPane.showConfirmDialog(this, "Do you want to run the server") == 0) {
      socketServer = new GameServer(this);
      socketServer.start();
    }

    socketClient = new GameClient(this, "localhost");
    socketClient.start();
  }