vooga.aiEngine
Class AbstractPlayer

java.lang.Object
  extended by vooga.gameEngine.game.GameRelatedObject
      extended by 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

Constructor Summary
AbstractPlayer()
           
 
Method Summary
 void addAIControlledListener(java.util.EventListener listener)
           
 void addItemToTrack(GameRelatedObject toTrack)
           
protected  GameItem getAI()
           
protected  int getDifficulty()
           
protected  java.util.List<GameRelatedObject> getItemsToTrack()
           
 void setDifficulty(int diff)
           
 void timeUpdated(TimeUpdateEvent t)
          Receives an TimeUpdateEvent for the implementing class to process.
 
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

AbstractPlayer

public AbstractPlayer()
Method Detail

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()