|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectSudokuBoard
public class SudokuBoard
SudokuBoard - A class containing the information necessary to solve
a 9x9 squiggly sudoku puzzle.
Each cell contains both a number (which the solver has placed in that
cell), and a letter (A-I) indicating the region to which the cell
belongs.
The rows and columns of a board are numbered from 0 to 8.
| Constructor Summary | |
|---|---|
SudokuBoard(int serialNum)
Construct the SudokuBoard with the given serial number. |
|
| Method Summary | |
|---|---|
int |
cellValue(int row,
int col)
Returns the value in the specified cell |
char |
mapValue(int row,
int col)
Returns the label for the region of the specified cell |
void |
printBoard()
Print the values in the board. |
void |
printRegionMap()
Print the labels for the regions in the board. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SudokuBoard(int serialNum)
serialNum - - the serial number of the board being constructed| Method Detail |
|---|
public int cellValue(int row,
int col)
throws java.lang.Exception
row - the row of the cell whose value is to be returnedcol - the column of the cell whose value is to be returned
java.lang.Exception - if row or column are out of bounds
public char mapValue(int row,
int col)
throws java.lang.Exception
row - the row of the cell whose region is to be returnedcol - the column of the cell whose region is to be returned
java.lang.Exception - if row or column are out of boundspublic void printBoard()
public void printRegionMap()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||