vooga.aiEngine
Class AbstractPlayer
java.lang.Object
vooga.gameEngine.game.GameRelatedObject
vooga.aiEngine.AbstractPlayer
- All Implemented Interfaces:
- java.io.Serializable, java.util.EventListener, TimeListener
- Direct Known Subclasses:
- AIDemoPlayer, DummyPlayer, PongPlayer, StickFightPlayer
public class AbstractPlayer
- extends GameRelatedObject
- implements TimeListener
This class is more a convenience; it consolidates all of the methods that
each game AI player needs to implement into one superclass
- Author:
- Trevor
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractPlayer
public AbstractPlayer()
addItemToTrack
public void addItemToTrack(GameRelatedObject toTrack)
getItemsToTrack
protected java.util.List<GameRelatedObject> getItemsToTrack()
addAIControlledListener
public void addAIControlledListener(java.util.EventListener listener)
getAI
protected GameItem getAI()
timeUpdated
public void timeUpdated(TimeUpdateEvent t)
throws java.lang.RuntimeException
- Description copied from interface:
TimeListener
- Receives an
TimeUpdateEvent
for the implementing class to
process.
- Specified by:
timeUpdated
in interface TimeListener
- Parameters:
t
- is the TimeUpdateEvent
- Throws:
java.lang.RuntimeException
setDifficulty
public void setDifficulty(int diff)
getDifficulty
protected int getDifficulty()