public interface ITile
All Known Implementing Classes: AbstractTile
Allows the programmer to shape the tile (element which form the map) without knowing what kind of tile it is.
Modifier and Type | Field and Description |
---|---|
static java.lang.Integer |
TILE_EDGE
Represents the length of a tile in pixels.
|
Modifier and Type | Method and Description |
---|---|
Coordinates |
getPosition()
Returns the position, on the map, of the tile under consideration.
|
Direction[] |
getPossibleWays()
Returns the possible directions the car can take on the specified tile.
|
java.awt.Image |
getSprite()
Returns the sprite used to portray the tile.
|
TileType |
getType()
Returns the run-time type of the tile under consideration.
|
void |
setPosition(Coordinates coords)
Sets the position, on the map, of the tile under consideration.
|
void |
setPosition(java.lang.Integer x,
java.lang.Integer y)
Sets the position, on the map, of the tile under consideration.
|
void |
setSprite(java.awt.Image sprite)
Sets the sprite used to portray the tile.
|
static final java.lang.Integer TILE_EDGE
TileType getType()
Direction[] getPossibleWays()
java.awt.Image getSprite()
Coordinates getPosition()
Coordinates
void setSprite(java.awt.Image sprite)
sprite
- the image used to portray the tilevoid setPosition(Coordinates coords)
coords
- position expresses in Coordinates
void setPosition(java.lang.Integer x, java.lang.Integer y)
x
- the row on the mapy
- the column on the map