|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmodel.ChessBoard
public class ChessBoard
ADT ChessBoard is responsible for portraying the chess board where the game is played.
| Constructor Summary | |
|---|---|
ChessBoard()
constructor: Creates a new 8X8 square ChessBoard. |
|
| Method Summary | |
|---|---|
Cell |
getCell(int x,
int y)
accessor(selector): Retrieves the cell at the given position. |
void |
setCell(int x,
int y,
Cell z)
transformer(mutative): Sets the cell at the given position x, y with the parameter z. |
java.lang.String |
toString()
accessor(selector): Returns a string representation of the chess board using pipes and underscores. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ChessBoard()
| Method Detail |
|---|
public Cell getCell(int x,
int y)
throws IllegalCellException
x - number of the row in the chess boardy - number of the column in the chess board
IllegalCellException - if coordinates do not correspond to a valid cell.
public void setCell(int x,
int y,
Cell z)
x - number of the row in the chess boardy - number of the column in the chess board
IllegalCellException - if coordinates do not correspond to a valid cell.public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||