|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttasks.Board
public class Board
Constructor Summary | |
---|---|
Board(double row,
double col,
int[][] userInput)
Constructor to be called by the SudokuTask. |
Method Summary | |
---|---|
Cell |
getCell(int x,
int y)
Get the cell at row x and column y. |
int |
getSize()
Get the dimension of one side of the grid. |
void |
printBoard()
Prints the entire grid with each cell's associated values. |
void |
printBoardPossibleValues()
Prints the each cell in the grid the the possible values each cell could potentially take. |
boolean |
setCell(int x,
int y,
int value)
Sets the cell at the specified coordinates to the value if none of the associated constraints conflict. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Board(double row, double col, int[][] userInput)
row
- The number of rows to be in the board.col
- The number of columns to be in the board.userInput
- The initial values set for a partially completed grid.Method Detail |
---|
public void printBoard()
public void printBoardPossibleValues()
public Cell getCell(int x, int y)
x
- The row coordinate.y
- The column coordinate.
public int getSize()
public boolean setCell(int x, int y, int value)
x
- The row coordinate.y
- The row coordinate.value
- The value to be set.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |