vooga.aiEngine.Dev
Class AIDemoPlayer
java.lang.Object
vooga.gameEngine.game.GameRelatedObject
vooga.aiEngine.AbstractPlayer
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
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AIDemoPlayer
public AIDemoPlayer(AIDemoItem item,
AIDemoItem target)
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()