|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectexplorer.SpaceGrid
public class SpaceGrid
Implements a 2D virtual space (grid)
Constructor Summary | |
---|---|
SpaceGrid(int dimension,
int[][] cells)
Creates a 2D virtual space - a square grid of X-Y cells (for both the axes the numeration start in the bottom-left corner) |
Method Summary | |
---|---|
int |
getDimension()
Returns the dimension of the grid |
int |
wallNumber()
Returns the number of wall-cell in the grid |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SpaceGrid(int dimension, int[][] cells)
dimension
- The heigh (x or y-size) of the grid.cells
- Cell Matrix: value in (ACCESSIBLE, FORBIDDEN, WALL)Method Detail |
---|
public int getDimension()
public int wallNumber()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |