aim4.map.destination
Class IdentityDestinationSelector
java.lang.Object
aim4.map.destination.IdentityDestinationSelector
- All Implemented Interfaces:
- DestinationSelector
public class IdentityDestinationSelector
- extends Object
- implements DestinationSelector
The IdentityDestinationSelector always chooses the Vehicle's current Road
as the destination Road, unless it is not a legal destination Road, in
which case it throws a RuntimeException.
Method Summary |
Road |
selectDestination(Lane currentLane)
Select the Road which the given Vehicle should use as its destination. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IdentityDestinationSelector
public IdentityDestinationSelector()
- Create a new IdentityDestinationSelector from the given Layout.
selectDestination
public Road selectDestination(Lane currentLane)
- Select the Road which the given Vehicle should use as its destination.
- Specified by:
selectDestination
in interface DestinationSelector
- Parameters:
currentLane
- the lane the Vehicle is currently on, usually also
the lane the vehicle spawned on
- Returns:
- the Road which the Vehicle should use as its
destination
Copyright © 2011. All Rights Reserved.