コード例 #1
0
 @Override
 public final void metaGame(long timeout) throws MetaGamingException {
   theClojureGamer.setMatch(getMatch());
   theClojureGamer.setRoleName(getRoleName());
   try {
     theClojureGamer.metaGame(timeout);
   } catch (RuntimeException e) {
     GamerLogger.logError("GamePlayer", "Caught exception in Clojure stateMachineMetaGame:");
     GamerLogger.logStackTrace("GamePlayer", e);
   }
 }
コード例 #2
0
  // TODO: This code should be put somewhere more general.
  public static void main(String args[]) {
    try {
      Gamer g = new ClojureLegalGamerStub();
      System.out.println(g.getName());

      Match m = new Match("", 1000, 1000, GameRepository.getDefaultRepository().getGame("conn4"));
      g.setMatch(m);
      g.setRoleName(GdlPool.getProposition(GdlPool.getConstant("xplayer")));
      g.metaGame(1000);
      System.out.println(g.selectMove(1000));
    } catch (Exception e) {
      e.printStackTrace();
    }
  }