public class Tile extends GameObject
Modifier and Type | Field and Description |
---|---|
boolean |
decoration
(Visualizer only) Whether this tile is deep sea or grassy.
|
int |
gold
The amount of gold buried on this tile.
|
Port |
port
The Port 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
The type of Tile this is ('water' or 'land').
|
Unit |
unit
The Unit on this Tile if present, otherwise null.
|
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 boolean decoration
public int gold
public Port port
public Tile tileEast
public Tile tileNorth
public Tile tileSouth
public Tile tileWest
public java.lang.String type
public Unit unit
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