Package net.sf.colossus.client
Class PredictSplits
- java.lang.Object
-
- net.sf.colossus.client.PredictSplits
-
public final class PredictSplits extends java.lang.Object
Predicts splits for one enemy player, and adjusts predictions as creatures are revealed.- Author:
- David Ripton See docs/SplitPrediction.txt
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) class
PredictSplits.ReverseIntegerComparator
-
Field Summary
Fields Modifier and Type Field Description private static java.util.logging.Logger
LOGGER
private NodeTurnComparator
nodeTurnComparator
private PredictSplitNode
root
-
Constructor Summary
Constructors Constructor Description PredictSplits(java.lang.String rootId, java.util.List<CreatureType> creatureTypes, Variant variant)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) PredictSplitNode
getLeaf(java.lang.String markerId)
Return the leaf PredictSplitNode with matching markerId.(package private) java.util.List<PredictSplitNode>
getLeaves(PredictSplitNode node)
Return all non-empty childless nodes in subtree starting from node.(package private) java.util.List<PredictSplitNode>
getNodes(PredictSplitNode node)
Return all non-empty nodes in subtree starting from node.PredictSplitNode
getRoot()
(package private) void
printLeaves()
Print all childless nodes in tree.(package private) void
printNodes()
Print all nodes in tree.
-
-
-
Field Detail
-
LOGGER
private static final java.util.logging.Logger LOGGER
-
root
private final PredictSplitNode root
-
nodeTurnComparator
private final NodeTurnComparator nodeTurnComparator
-
-
Constructor Detail
-
PredictSplits
PredictSplits(java.lang.String rootId, java.util.List<CreatureType> creatureTypes, Variant variant)
-
-
Method Detail
-
getLeaves
java.util.List<PredictSplitNode> getLeaves(PredictSplitNode node)
Return all non-empty childless nodes in subtree starting from node.
-
getNodes
java.util.List<PredictSplitNode> getNodes(PredictSplitNode node)
Return all non-empty nodes in subtree starting from node.
-
printLeaves
void printLeaves()
Print all childless nodes in tree.
-
printNodes
void printNodes()
Print all nodes in tree.
-
getLeaf
PredictSplitNode getLeaf(java.lang.String markerId)
Return the leaf PredictSplitNode with matching markerId.
-
getRoot
public PredictSplitNode getRoot()
-
-