Ejemplo n.º 1
0
 private static void startComputerPlayer() {
   String username = "******" + System.currentTimeMillis() % 100 + "-" + COUNT++;
   Credentials creds = new UsernamePasswordCreds(new Name(username), PASSWORD);
   Client client = new Client(creds, RunQueue.AWT);
   new AIDirector(client);
   client.setServer(SERVER, new int[] {PORT});
   client.logon();
 }
Ejemplo n.º 2
0
  // from interface GameApplet.Delegate
  public void stop() {
    _framemgr.stop();

    // if we're logged on, log off
    if (_client != null) {
      Client client = _client.getContext().getClient();
      if (client != null && client.isLoggedOn()) {
        client.logoff(true);
      }
    }
  }