vooga.aiEngine.Dev
Class AIDemoPlayer

java.lang.Object
  extended by vooga.gameEngine.game.GameRelatedObject
      extended by vooga.aiEngine.AbstractPlayer
          extended by vooga.aiEngine.Dev.AIDemoPlayer
All Implemented Interfaces:
java.io.Serializable, java.util.EventListener, TimeListener

public class AIDemoPlayer
extends AbstractPlayer
implements TimeListener

A demo player, for firing events and performing a specific, assignable movement algorithm

Author:
Grant Warman
See Also:
Serialized Form

Constructor Summary
AIDemoPlayer(AIDemoItem item, AIDemoItem target)
           
 
Method Summary
 AIDemoItem getGameItem()
           
 AIDemoItem getTarget()
           
 void setAlgorithm(AbstractAlgorithm algorithm, java.lang.Object... args)
          Changes the algorithm of the player, and determines the specific algorithm arguments
 void setTarget(AIDemoItem target)
           
 void timeUpdated(TimeUpdateEvent t)
          Uses the specified algorithm when a time update event is called
 
Methods inherited from class vooga.aiEngine.AbstractPlayer
addAIControlledListener, addItemToTrack, getAI, getDifficulty, getItemsToTrack, setDifficulty
 
Methods inherited from class vooga.gameEngine.game.GameRelatedObject
addEventListener, clearListeners, equals, fire, fire, fire, getEventListeners, getID, getListenerCount, removeEventListener
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AIDemoPlayer

public AIDemoPlayer(AIDemoItem item,
                    AIDemoItem target)
Method Detail

setTarget

public void setTarget(AIDemoItem target)

setAlgorithm

public void setAlgorithm(AbstractAlgorithm algorithm,
                         java.lang.Object... args)
Changes the algorithm of the player, and determines the specific algorithm arguments

Parameters:
algorithm -
args -

timeUpdated

public void timeUpdated(TimeUpdateEvent t)
                 throws java.lang.RuntimeException
Uses the specified algorithm when a time update event is called

Specified by:
timeUpdated in interface TimeListener
Overrides:
timeUpdated in class AbstractPlayer
Parameters:
t - is the TimeUpdateEvent
Throws:
InvalidAlgorithmArgumentsException
java.lang.RuntimeException

getTarget

public AIDemoItem getTarget()

getGameItem

public AIDemoItem getGameItem()