aim4.map.destination
Class UniqueDestinationSelector

java.lang.Object
  extended by aim4.map.destination.UniqueDestinationSelector
All Implemented Interfaces:
DestinationSelector

public class UniqueDestinationSelector
extends Object
implements DestinationSelector

The unique destination selector which always returns the same destination


Constructor Summary
UniqueDestinationSelector(Road endRoad)
          Create a unique destination selector.
 
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
 

Constructor Detail

UniqueDestinationSelector

public UniqueDestinationSelector(Road endRoad)
Create a unique destination selector.

Parameters:
endRoad - the destination
Method Detail

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.