vooga.aiEngine.Algorithms
Class AbstractAlgorithm

java.lang.Object
  extended by vooga.aiEngine.Algorithms.AbstractAlgorithm
Direct Known Subclasses:
AStar, Dangler, EscapeRadius, ExpectiMinimax, NPSolver, Orbiter, PongAlgorithm, PongAlgorithmSmart, StickFighterAlgorithm, Tag, XFollower, YFollower

public abstract class AbstractAlgorithm
extends java.lang.Object

An extremely crude foundation for an algorithmic class hierarchy

Author:
Grant Warman

Constructor Summary
AbstractAlgorithm()
           
 
Method Summary
abstract  void perform(java.lang.Object... args)
          Performs an arbitrary algorithm with arbitrary parameters.
 void performWithDelay(long dt, java.lang.Object... args)
           
 void setDelay(long delay)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractAlgorithm

public AbstractAlgorithm()
Method Detail

setDelay

public void setDelay(long delay)

performWithDelay

public void performWithDelay(long dt,
                             java.lang.Object... args)
                      throws java.lang.RuntimeException
Throws:
java.lang.RuntimeException

perform

public abstract void perform(java.lang.Object... args)
                      throws java.lang.RuntimeException
Performs an arbitrary algorithm with arbitrary parameters. Defines the basic parameters of an algorithm. Algorithms generally require a number of EventObjects which the algorithm fires according to certain specifications.

Parameters:
args -
Throws:
java.lang.RuntimeException