public class Tile extends GameObject
Modifier and Type | Field and Description |
---|---|
int |
food
The number of food dropped on this Tile.
|
int |
harvestRate
The amount of food that can be harvested from this Tile per turn.
|
int |
materials
The number of materials dropped on this Tile.
|
Structure |
structure
The Structure 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).
|
int |
turnsToHarvest
The amount of turns before this resource can be harvested.
|
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 int food
public int harvestRate
public int materials
public Structure structure
public Tile tileEast
public Tile tileNorth
public Tile tileSouth
public Tile tileWest
public int turnsToHarvest
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