aim4.map
Class GridMapUtil.EnumerateSpawnSpecGenerator

java.lang.Object
  extended by aim4.map.GridMapUtil.EnumerateSpawnSpecGenerator
All Implemented Interfaces:
SpawnPoint.SpawnSpecGenerator
Enclosing class:
GridMapUtil

public static class GridMapUtil.EnumerateSpawnSpecGenerator
extends Object
implements SpawnPoint.SpawnSpecGenerator

The spawn spec generator that enumerates spawn spec.


Constructor Summary
GridMapUtil.EnumerateSpawnSpecGenerator(SpawnPoint spawnPoint, List<Road> destinationRoads, double initSpawnTime, double spawnPeriod)
          Create a spawn spec generator that enumerates spawn spec.
 
Method Summary
 List<SpawnPoint.SpawnSpec> act(SpawnPoint spawnPoint, double timeStep)
          Advance the time step.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GridMapUtil.EnumerateSpawnSpecGenerator

public GridMapUtil.EnumerateSpawnSpecGenerator(SpawnPoint spawnPoint,
                                               List<Road> destinationRoads,
                                               double initSpawnTime,
                                               double spawnPeriod)
Create a spawn spec generator that enumerates spawn spec.

Parameters:
spawnPoint - the spawn point
destinationRoads - the list of destination roads
initSpawnTime - the initial spawn time
spawnPeriod - the spawn period
Method Detail

act

public List<SpawnPoint.SpawnSpec> act(SpawnPoint spawnPoint,
                                      double timeStep)
Advance the time step.

Specified by:
act in interface SpawnPoint.SpawnSpecGenerator
Parameters:
spawnPoint - the spawn point
timeStep - the time step
Returns:
the list of spawn spec generated in this time step.


Copyright © 2011. All Rights Reserved.