|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.generation5.ai.BoardGameAgent
Abstract class designed to facilitate board game agent development.
BoardGameAgent| Field Summary | |
protected BoardGame |
boardGame
The board game this agent is connected with. |
protected int |
playerID
The player ID. |
| Constructor Summary | |
BoardGameAgent()
Create a new instance of BoardGameAgent. |
|
BoardGameAgent(int pid)
Create a new instance of BoardGameAgent. |
|
| Method Summary | |
BoardGame |
getBoardGame()
Return the board game associated with this agent. |
int |
getPlayerID()
Get the player ID. |
abstract void |
init()
Initialize the agent. |
void |
setBoardGame(BoardGame game)
Set the board game associated with this agent. |
void |
setPlayerID(int pid)
Set the player ID. |
abstract int[] |
think()
This abstract method should implement the agent's AI. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected int playerID
protected BoardGame boardGame
| Constructor Detail |
public BoardGameAgent()
public BoardGameAgent(int pid)
pid - the player ID.| Method Detail |
public abstract int[] think()
validMove method.
BoardGame.validMove(int, int[])public abstract void init()
public void setPlayerID(int pid)
pid - the new player ID.public int getPlayerID()
public void setBoardGame(BoardGame game)
game - the new board game.public BoardGame getBoardGame()
|
This documentation is part of the Generation5 JDK.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||