public class Grid
extends java.lang.Object
Constructor and Description |
---|
Grid(int x,
int y)
Creates a new instance of the Grid.
|
Modifier and Type | Method and Description |
---|---|
void |
addWall(Wall wall)
Adds a new Wall that connects the Grid to another.
|
boolean |
canGoDown()
Determine if moving Downward from the grid is possible.
|
boolean |
canGoLeft()
Determine if moving to the Left from the grid is possible.
|
boolean |
canGoRight()
Determine if moving to the Right from the grid is possible.
|
boolean |
canGoUp()
Determine if moving Upward from the grid is possible.
|
java.lang.String |
getAssetName()
Based on the configuration of the grid, this will return the asset name that will
display this grid.
|
int |
getX()
Get the Column number that the Grid belongs to.
|
int |
getY()
Get the Row number that the Grid belongs to.
|
public Grid(int x, int y)
x
- The column which the Grid belongs to in the Maze.y
- The row which the Grid belongs to in the Maze.public int getX()
public int getY()
public void addWall(Wall wall)
wall
- The wall that connects the Grid to another.public boolean canGoLeft()
public boolean canGoRight()
public boolean canGoUp()
public boolean canGoDown()
public java.lang.String getAssetName()