Constructor and Description |
---|
BasicNavigator(VehicleSpec vehicleSpec,
BasicMap basicMap)
Construct a new Navigator for the given Vehicle specification.
|
Modifier and Type | Method and Description |
---|---|
Road |
navigate(Road current,
IntersectionManager im,
Road destination)
Given the current Road, the IntersectionManager being approached, and
a destination Road, find a road that leave the IntersectionManager that
will lead to the destination Road.
|
public BasicNavigator(VehicleSpec vehicleSpec, BasicMap basicMap)
vehicleSpec
- the vehicle's specificationbasicMap
- the map objectpublic Road navigate(Road current, IntersectionManager im, Road destination)
navigate
in interface Navigator
current
- the Road on which the vehicle is currently travelingim
- the IntersectionManager the vehicle is approachingdestination
- the Road on which the vehicle would ultimately like to
end upCopyright © 2013. All rights reserved.