public class Tile extends GameObject
Modifier and Type | Field and Description |
---|---|
Beaver |
beaver
The Beaver on this Tile if present, otherwise null.
|
int |
branches
The number of branches dropped on this Tile.
|
java.lang.String |
flowDirection
The cardinal direction water is flowing on this Tile ('North', 'East', 'South', 'West').
|
int |
food
The number of food dropped on this Tile.
|
Player |
lodgeOwner
The owner of the Beaver lodge on this Tile, if present, otherwise null.
|
Spawner |
spawner
The resource Spawner on this Tile if present, otherwise null.
|
Tile |
tileEast
The Tile to the 'East' of this one (x+1, y).
|
Tile |
tileNorth
The Tile to the 'North' of this one (x, y-1).
|
Tile |
tileSouth
The Tile to the 'South' of this one (x, y+1).
|
Tile |
tileWest
The Tile to the 'West' of this one (x-1, y).
|
java.lang.String |
type
What type of Tile this is, either 'water' or 'land'.
|
int |
x
The x (horizontal) position of this Tile.
|
int |
y
The y (vertical) position of this Tile.
|
logs
Modifier and Type | Method and Description |
---|---|
java.util.List<Tile> |
getNeighbors()
Gets the neighbors of this Tile
|
boolean |
hasNeighbor(Tile tile)
Checks if this Tile has a specific neighboring Tile
|
boolean |
isPathable()
Checks if a Tile is pathable to units
|
log
public Beaver beaver
public int branches
public java.lang.String flowDirection
public int food
public Player lodgeOwner
public Spawner spawner
public Tile tileEast
public Tile tileNorth
public Tile tileSouth
public Tile tileWest
public java.lang.String type
public int x
public int y
public java.util.List<Tile> getNeighbors()
public boolean isPathable()
public boolean hasNeighbor(Tile tile)
tile
- Tile to check against© 2020 MST ACM SIG-GAME