예제 #1
0
파일: AIToyBoxApp.java 프로젝트: nh2/dsa42
 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();
 }
예제 #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);
      }
    }
  }