org.vizzini.game
Class AsynchronousEngine

java.lang.Object
  extended by org.vizzini.game.AbstractEngine
      extended by org.vizzini.game.AsynchronousEngine
All Implemented Interfaces:
IActionReceivedListener, IEngine, IListener

public class AsynchronousEngine
extends AbstractEngine
implements IActionReceivedListener

Provides functionality for an engine where the agent's actions occur at any time and any amount.

Since:
v0.1
Version:
v0.3
Author:
Jeffrey M. Thompson

Constructor Summary
AsynchronousEngine()
          Construct this object.
 
Method Summary
 void actionReceived(ActionReceivedEvent event)
          Respond to action received events.
protected  Queue getQueue(IAgent agent)
          Return the queue for the given agent, creating it if necessary.
 void reset()
          Reset to the initial state.
 void run()
          Perform the game loop activity.
 
Methods inherited from class org.vizzini.game.AbstractEngine
addGameListener, configure, createGameThread, cycleSleep, getActionList, getCurrentAgent, getEnvironment, getGameThread, getMinCycleTime, isFiringGameChanges, isGameOver, isPaused, pause, removeGameListener, resume, setCurrentAgent, setEnvironment, setFiringGameChanges, setGameOver, setMinCycleTime, start, step
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AsynchronousEngine

public AsynchronousEngine()
Construct this object.

Since:
v0.2
Method Detail

actionReceived

public void actionReceived(ActionReceivedEvent event)
Respond to action received events.

Specified by:
actionReceived in interface IActionReceivedListener
Since:
v0.1

reset

public void reset()
Reset to the initial state.

Specified by:
reset in interface IEngine
Overrides:
reset in class AbstractEngine
Since:
v0.1

run

public void run()
Perform the game loop activity.

Specified by:
run in interface IEngine
Since:
v0.1

getQueue

protected Queue getQueue(IAgent agent)
Return the queue for the given agent, creating it if necessary.

Since:
v0.1


Copyright 2007 Vizzini.org. All Rights Reserved. 2007.12.25.03.00.02