DroidFishTest: Small cleanup in GameTreeTest.

This commit is contained in:
Peter Osterlund
2011-12-18 07:12:35 +00:00
parent 3b6511d97f
commit 818bc9d9a9
3 changed files with 44 additions and 36 deletions

View File

@@ -40,21 +40,24 @@ public class GameTree {
// Result is the last tag pair in the STR, but it is computed on demand from the game tree.
Position startPos;
String timeControl;
private String timeControl;
// Non-standard tags
static private final class TagPair {
String tagName;
String tagValue;
}
List<TagPair> tagPairs;
private List<TagPair> tagPairs;
Node rootNode;
Node currentNode;
Position currentPos; // Cached value. Computable from "currentNode".
PgnToken.PgnTokenReceiver gameStateListener;
private final PgnToken.PgnTokenReceiver gameStateListener;
/** Creates an empty GameTree start the standard start position.
* @param gameStateListener Optional tree change listener.
*/
public GameTree(PgnToken.PgnTokenReceiver gameStateListener) {
this.gameStateListener = gameStateListener;
try {
@@ -732,7 +735,7 @@ public class GameTree {
updateListener();
}
/* Get linear game history, using default variations at branch points. */
/** Get linear game history, using default variations at branch points. */
public final Pair<List<Node>, Integer> getMoveList() {
List<Node> ret = new ArrayList<Node>();
Node node = currentNode;

View File

@@ -46,8 +46,9 @@ public class PgnToken {
this.token = token;
}
/** PGN parser visitor interface. */
public interface PgnTokenReceiver {
/** If this method returns false, the object needs a full reinitialization, using clear() and processToken(). */
/** If this method returns false, the object needs a full re-initialization, using clear() and processToken(). */
public boolean isUpToDate();
/** Clear object state. */