public class Wall
extends java.lang.Object
Constructor and Description |
---|
Wall(Grid nextGrid,
Grid otherGrid)
Creates a new instance of Wall
|
Modifier and Type | Method and Description |
---|---|
Grid |
getNextGrid()
Get the first grid.
|
Grid |
getNextGrid(Grid currentGrid)
Get the other grid of connected by the wall that is not the current grid
|
Grid |
getOtherGrid()
Get the second grid
|
boolean |
isOpened()
Determine if the wall is opened.
|
void |
setOpened(boolean opened)
Sets the wall closed or opened.
|
public Grid getNextGrid(Grid currentGrid)
currentGrid
- The current grid that connected by the wall.public Grid getNextGrid()
public Grid getOtherGrid()
public boolean isOpened()
public void setOpened(boolean opened)
opened
- True for open, False for close