Package | Description |
---|---|
carsproject.general | |
carsproject.map | |
carsproject.vehicles |
Modifier and Type | Method and Description |
---|---|
static java.lang.Double |
Coordinates.distanceFromTwoPoints(Coordinates p1,
Coordinates p2)
Calculate and return distance from two given points of type Coordinates.
|
static boolean |
Coordinates.isLegal(Coordinates point)
Check if a coordinate is legal (inside the map).
|
Modifier and Type | Method and Description |
---|---|
Coordinates |
Roads.Bow.getCenterBow()
Returns the center of the bow.
|
Coordinates |
ITile.getPosition()
Returns the position, on the map, of the tile under consideration.
|
Coordinates |
AbstractTile.getPosition() |
static Coordinates |
MapManager.pointToCoordinates(MapManager.Point point)
Conversion from coordinates to configuration file numbering.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<Coordinates> |
MapTiles.getSpawnCoordinates()
Return all spawn points of the map.
|
Modifier and Type | Method and Description |
---|---|
void |
MapTiles.addSpawnCoordinates(Coordinates spawnCoords)
Add a spawn point with coordinates to the map.
|
static MapManager.Point |
MapManager.coordinatesToPoint(Coordinates coords)
Conversion from coordinates to configuration file numbering.
|
ITile |
MapTiles.getTileAt(Coordinates pos)
Returns the tile at the specified position.
|
void |
ITile.setPosition(Coordinates coords)
Sets the position, on the map, of the tile under consideration.
|
void |
AbstractTile.setPosition(Coordinates coords) |
Constructor and Description |
---|
AbstractTile(java.awt.Image sprite,
Coordinates position)
Constructor of
AbstractTile class, assigns the passed parameters
to the respective variables. |
EnvTile.Base(java.awt.Image sprite,
Coordinates position)
Constructor of
EnvTile.Base class, call the constructor of the
super-class EnvTile . |
EnvTile(java.awt.Image sprite,
Coordinates position)
Constructor of
EnvTile class, calls the constructor of the
super-class AbstractTile and assigns value 0 to the
field AbstractTile.possibleWays . |
Roads.Bow(java.awt.Image sprite,
Coordinates position,
Direction[] way,
int source)
Constructor of the
Roads.Bow class, calls the constructor of the
super-class Roads , assigns the type of the tile to
BOW of the TileType enum, the grade of the bow and
the center of the bow expressed in Coordinates . |
Roads.Cross(java.awt.Image sprite,
Coordinates position,
Direction[] way)
Constructor of
Roads.Cross class, calls the constructor af the
super-class Roads and assigns the type of the tile to
CROSS of the TileType enum. |
Roads.Priority(java.awt.Image sprite,
Coordinates position,
Direction[] way)
Constructor of
Roads.Priority class, calls the constructor af the
super-class Roads and assigns the type of the tile to
Roads.Priority of the TileType enum. |
Roads.Road(java.awt.Image sprite,
Coordinates position,
Direction[] way)
Constructor of
Roads.Road class, calls the constructor af the
super-class Roads and assigns the type of the tile to
ROAD of the TileType enum. |
Roads.Stop(java.awt.Image sprite,
Coordinates position,
Direction[] way)
Constructor of
Roads.Stop class, calls the constructor af the
super-class Roads and assigns the type of the tile to
STOP of the TileType enum. |
Roads.TrafficLight(java.awt.Image[] sprites,
Coordinates position,
Direction[] way)
Constructor of
Roads.TrafficLight class, calls the constructor af
the super-class Roads , assigns the default state 2 (RED) and
the type of the tile to TRAFFIC_LIGHT of the TileType
enum. |
Roads.Zebra(java.awt.Image sprite,
Coordinates position,
Direction[] way)
Constructor of
Roads.Zebra class, calls the constructor af the
super-class Roads and assigns the type of the tile to
ZEBRA_CROSSING of the TileType enum. |
Roads(java.awt.Image sprite,
Coordinates position,
Direction[] way)
Constructor of
Roads class, call the constructor of the
super-class AbstractTile and assigns the actual direction kept by
the road. |
Modifier and Type | Method and Description |
---|---|
Coordinates[] |
IModelVehicle.getAnglesPosition()
Return angles position in a vector of four elements.
|
Coordinates[] |
AbstrModelVehicle.getAnglesPosition()
Return an array of 4 elements containing vehicle's angles.
|
Coordinates |
AbstrModelVehicle.getCenterPoint()
Return center point of the vehicle, calculating it on image dimensions.
|
static Coordinates |
AbstrThreadVehicle.getCenterPoint(ITile startTile,
Direction startDir,
Direction endDir)
Function to get center point of a curve.
|
Coordinates |
IModelVehicle.getPosition()
Returns vehicle coordinates.
|
Coordinates |
AbstrModelVehicle.getPosition()
GETTERS AND SETTERS
|
Modifier and Type | Method and Description |
---|---|
IModelVehicle |
Garage.getVehicle(Coordinates positionToSearch)
Given a position, it returns a vehicle if standing in that
position, null otherwise.
|
void |
IModelVehicle.setPosition(Coordinates position)
Set vehicle coordinates.
|
void |
AbstrModelVehicle.setPosition(Coordinates position) |