コード例 #1
0
ファイル: Game.java プロジェクト: PadawanBreslau/ZPionka
 /**
  * Returns whether the given position occurs in the main line of this game.
  *
  * @param position the position to look for, must not be null
  * @return whether the given position occurs in the main line of this game
  */
 public boolean containsPosition(ImmutablePosition position) {
   boolean res = false;
   int index = getCurNode();
   gotoStart(true);
   for (; ; ) {
     if (m_position.getHashCode() == position.getHashCode()) {
       res = true;
       break;
     }
     if (!hasNextMove()) break;
     goForward(true);
   }
   gotoNode(index, true);
   return res;
 }