|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectPrintGame.Field
Implementation of a two dimensional field
| Field Summary | |
protected java.lang.Object[][] |
field_
|
| Constructor Summary | |
Field(int rows,
int cols)
standard constructor |
|
| Method Summary | |
int |
getNumCols()
returns the number of allocated columns |
int |
getNumRows()
returns the number of allocated rows |
java.lang.String |
toString()
standard toString method for debugging |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected java.lang.Object[][] field_
| Constructor Detail |
public Field(int rows,
int cols)
throws java.lang.IllegalArgumentException
rows - the number of rows of the fieldcols - the number of columns of the field
java.lang.IllegalArgumentException - thrown if either rows or cols
is < 0| Method Detail |
public int getNumRows()
public int getNumCols()
public java.lang.String toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||