|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectsudoku.game.BoardState
BoardState stores the current state of the board by keeping track of which values still remain playable. These are kept in a double array of ArrayLists of Integers. It interfaces to the GUI through the Board class.
| Constructor Summary | |
BoardState(Board b)
Create a new BoardState object. |
|
| Method Summary | |
void |
play(Square square,
int v)
Attempts to set the argument Square to the given value then recalculates the possible values of all other Squares. |
void |
randomInit(int numSquares)
Iniitializes a number of squares to random values and sets them as non-modifiable. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public BoardState(Board b)
b - The Board object used to access the GUI.| Method Detail |
public void randomInit(int numSquares)
numSquares - The number of squares to randomly initialize
public void play(Square square,
int v)
square - The Square to try to play.v - The value to try to set the Square to.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||