|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jaige.Player jaige.AI
public abstract class AI
This is the base class of all AIs. Extend this class to implement an AI, create a jar, and place it in the plugins directory. Please perform all initialization in the initialize method, and only call super() in your constructor. Imagine a list of 100 AI's and the user wants to pick 2 of them. Each one needs to have unique information, but instead of initializing all 100 of them, we just initialize the 2 we need. This is especially useful for an AI that loads a database of moves, there is no point in loading the database if it isn't the AI playing.
Copyright (c) Jaige 2007
Constructor Summary | |
---|---|
AI()
This is the default constructor that, when called with super(), will set the name from getAIName() to getName() in the Player class. |
Method Summary | |
---|---|
abstract java.lang.String |
getAIName()
Returns the unique name of this AI. |
abstract java.lang.String |
getAuthor()
Returns the name of the author that created this AI. |
abstract java.lang.String |
getInfo()
Returns information about this AI that the user might want to see. |
abstract Version |
getVersion()
This is used to determine the version of the AI playing. |
abstract void |
initialize()
Initializes this AI, this should be used to initialize the AI instead of the constructor. |
protected void |
makeMove(int... i)
Subclasses should call this method to perform their move. |
abstract void |
uninitialize()
Preforms any cleanup needed on the AI. |
Methods inherited from class jaige.Player |
---|
getColor, getName, getOrientation, setColor, setName, setOrientation |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface jaige.event.TurnListener |
---|
processTurnEvent |
Constructor Detail |
---|
public AI()
Method Detail |
---|
public abstract Version getVersion()
public abstract java.lang.String getInfo()
public abstract java.lang.String getAIName()
public abstract java.lang.String getAuthor()
public abstract void initialize()
public abstract void uninitialize()
protected void makeMove(int... i)
i
- The values of the move desired to be made.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |