|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.eriksilkensen.sudoku.Board
public class Board
A Board represents a Sudoku game board which is composed with a 2D array of Cell objects.
| Constructor Summary | |
|---|---|
Board()
Default constructor. |
|
Board(Board other)
Copy constructor |
|
Board(Cell[][] cells,
BoardDifficulties difficulty)
Creates a Board with the supplied Cells and difficulty level |
|
| Method Summary | |
|---|---|
Board |
clear()
Clears the Board by resetting all of its Cells to value 0 and type Player |
boolean |
equals(java.lang.Object o)
Determines the equality of this Board and another one |
Cell |
getCell(int row,
int col)
Gets the Cell at the location [row][col] |
Cell[][] |
getCells()
Returns this Board's Cells |
java.lang.String |
getCellString(int row,
int col)
Returns the String representation of the Cell at location [row][col] |
BoardDifficulties |
getDifficulty()
Returns this Board's difficulty |
int |
getID()
Returns this Board's ID |
void |
printBoard()
Prints out the Board |
Cell |
removeCell(int row,
int col)
Removes the Cell at the location [row][col] and returns it |
Board |
resetBoard(Board board)
Resets the supplied Board and returns it |
void |
setCell(int row,
int col,
Cell cell)
Sets the Cell at the location [row][col] to be 'cell' |
void |
setDifficulty(BoardDifficulties difficulty)
Sets this Board's difficulty |
void |
setID(int ID)
Sets this Board's ID |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Board()
public Board(Board other)
public Board(Cell[][] cells,
BoardDifficulties difficulty)
| Method Detail |
|---|
public Cell removeCell(int row,
int col)
public void setCell(int row,
int col,
Cell cell)
public Cell getCell(int row,
int col)
public Board clear()
public Board resetBoard(Board board)
public void printBoard()
public java.lang.String getCellString(int row,
int col)
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic Cell[][] getCells()
public BoardDifficulties getDifficulty()
public void setDifficulty(BoardDifficulties difficulty)
public void setID(int ID)
public int getID()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||