Package | Description |
---|---|
carsproject.map | |
carsproject.vehicles |
Modifier and Type | Method and Description |
---|---|
static Direction |
Direction.getContrary(Direction way)
Returns the opposite direction respect to that given.
|
Direction[] |
ITile.getPossibleWays()
Returns the possible directions the car can take on the specified tile.
|
Direction[] |
AbstractTile.getPossibleWays() |
static Direction |
Direction.valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static Direction[] |
Direction.values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
Modifier and Type | Method and Description |
---|---|
static Direction |
Direction.getContrary(Direction way)
Returns the opposite direction respect to that given.
|
static java.lang.Integer |
Direction.wayToNumber(Direction way)
Trasforms a Direction to a number.
|
Constructor and Description |
---|
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 |
---|---|
static Direction |
AbstrModelVehicle.degreesToDirection(java.lang.Double degrees)
Conversion method from rotational degrees to Direction
|
Direction |
IModelVehicle.getWay()
Return the direction in which the vehicle is going.
|
Direction |
AbstrModelVehicle.getWay()
Return the direction in which the vehicle is going.
|
Modifier and Type | Method and Description |
---|---|
static java.lang.Double |
AbstrModelVehicle.directionToDegrees(Direction d)
Conversion method from Direction to rotational degrees.
|
static Coordinates |
AbstrThreadVehicle.getCenterPoint(ITile startTile,
Direction startDir,
Direction endDir)
Function to get center point of a curve.
|