java.lang.ObjectMoveLib
| Field Summary | |
static int |
BOWL_A
|
static int |
BOWL_B
|
static int |
BOWL_C
|
static int |
BOWL_D
|
private java.util.Hashtable |
lib
|
static int[] |
MOVE_ROOT
|
private int[] |
parent
Parent is our linkage back to the previous move. |
| Constructor Summary | |
(package private) |
MoveLib()
To ease some of the painful process of learning, we load the library with some of the more obvious moves. |
| Method Summary | |
(package private) int |
getMove(int[] board)
getMove attempts to look up a move in the library, based on the current state of the board. |
(package private) void |
lostGame()
lostGame trims back the move tree to the last guess made. |
(package private) void |
resetParent()
|
(package private) int |
storedMoves()
This returns the stored move count, which is displayed on the game board. |
java.lang.String |
toString()
This has proven useful in debugging and thus, has been left in. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
private java.util.Hashtable lib
private java.util.Random ran
private int[] parent
public static final int BOWL_A
public static final int BOWL_B
public static final int BOWL_C
public static final int BOWL_D
public static final int[] MOVE_ROOT
public static final java.lang.String[] bowlName
public static final int[][] bowlLabelLocation
| Constructor Detail |
MoveLib()
| Method Detail |
int storedMoves()
public java.lang.String toString()
void resetParent()
int getMove(int[] board)
void lostGame()