vooga.aiEngine.stickfightergameAI
Class StickFightPlayer

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

public class StickFightPlayer
extends AbstractPlayer
implements TimeListener

StickFightPlayer.java

Author:
Cody Freeman This class is a player for Stickfighter, which due to abandonment is really more theoretical than anything else. This player would read through all possible targets, make a course for the nearest target, and once in range would attack. This class has an option to write an entire Game History documenting player and AI changes in position. It does not record wins, because it's unnecessary for the AI to care about the score, so this class is streamlined to deal only with positions. Possible actions and history output formats that can be made by the AI have been pulled to outside files for easier extension. See StickFight_GameHistory.txt and StickFight_Moves.txt. GameHistory would ideally write down all actions carried out by all players, and Moves allows for the creation of new moves tied to new numerical values, in this case representing possible damage to opponents.
See Also:
Serialized Form

Constructor Summary
StickFightPlayer()
           
 
Method Summary
 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

StickFightPlayer

public StickFightPlayer()
Method Detail

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