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(); }
// 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); } } }