Example #1
0
 /** Create a game tree with the current board position as setup stones. */
 public static GameTree makeTreeFromPosition(ConstGameInfo info, ConstBoard board) {
   if (info == null) info = new GameInfo();
   GameTree tree =
       new GameTree(
           board.getSize(),
           info.getKomi(),
           null,
           info.get(StringInfo.RULES),
           info.getTimeSettings());
   Node root = tree.getRoot();
   for (GoPoint p : board) {
     GoColor c = board.getColor(p);
     if (c.isBlackWhite()) root.addStone(c, p);
   }
   root.setPlayer(board.getToMove());
   return tree;
 }