public class Wall extends java.lang.Object implements BoardElement<WallType>
Constructor and Description |
---|
Wall(WallType wallType,
Direction direction)
Initializes a wall
|
Modifier and Type | Method and Description |
---|---|
BoardElement<WallType> |
copy()
Makes a copy of the board element
|
Direction |
getDirection()
Gets the direction of the element
|
WallType |
getType()
Gets the type of the element
|
void |
setDirection(Direction newDirection)
Changes the direction of the element
|
java.lang.String |
toString() |
public WallType getType()
BoardElement
getType
in interface BoardElement<WallType>
public Direction getDirection()
BoardElement
getDirection
in interface BoardElement<WallType>
public void setDirection(Direction newDirection)
BoardElement
setDirection
in interface BoardElement<WallType>
newDirection
- The element's new directionpublic BoardElement<WallType> copy()
BoardElement
copy
in interface BoardElement<WallType>
public java.lang.String toString()
toString
in class java.lang.Object