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