|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectassignment2.BoggleBoard
public class BoggleBoard
Represent a Boggle Board to play a game of Boggle.
| Constructor Summary | |
|---|---|
BoggleBoard(java.lang.String[] faces)
Create a square boggle board from an array of Strings/Cube faces. |
|
| Method Summary | |
|---|---|
java.lang.String |
getFace(int row,
int col)
Return the cube face at specified location, this will be a one-character string, presumably, or "Qu" for a Q-cube. |
int |
size()
Returns dimension of a square board, e.g., 4 or 5 for Boggle or Big Boggle, respectively. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public BoggleBoard(java.lang.String[] faces)
faces - is row-major order of cubes used in
the board for Boggle| Method Detail |
|---|
public int size()
public java.lang.String getFace(int row,
int col)
row - is row of cube whose face is returnedcol - is column of cube whose face is returned
java.lang.ArrayIndexOutOfBoundsException - if cube location
isn't validpublic 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 | |||||||