public class Maze extends Object
| Constructor and Description |
|---|
Maze(int width,
int height)
Constructs a new maze with given width and height.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getHeight() |
MazeCell[][] |
getMaze() |
MazeCell |
getMazeCell(int x,
int y) |
List<MazeCell> |
getPath(int startX,
int startY,
int targetX,
int targetY)
Returns shortest path between two cells in the maze.
|
int |
getWidth() |
public Maze(int width,
int height)
width - maze widthheight - maze heightpublic int getWidth()
public int getHeight()
public MazeCell[][] getMaze()
public MazeCell getMazeCell(int x, int y)
public List<MazeCell> getPath(int startX, int startY, int targetX, int targetY)
startX - x of start maze cellstartY - y of start maze celltargetX - x of target maze celltargetY - y of target maze cellCopyright © 2017. All rights reserved.