/** * Method to traverse the game in postfix order (first the lines, then the main line). This method * is used by {@link chesspresso.pgn.PGN}. * * @param listener the listener to receive event when arriving at nodes * @param withLines whether or not to include lines of the current main line. */ public void traverse(GameListener listener, boolean withLines) { int index = getCurNode(); gotoStart(true); traverse(listener, withLines, m_position.getPlyNumber(), 0); gotoNode(index, true); }
public int getCurrentMoveNumber() { return (m_position.getPlyNumber() + 1) / 2; }
public int getNextMoveNumber() { return (m_position.getPlyNumber() + 2) / 2; }
public int getCurrentPly() { return m_position.getPlyNumber(); }