Package threeChess.agents
Class ManualAgent
- java.lang.Object
-
- threeChess.Agent
-
- threeChess.agents.ManualAgent
-
- All Implemented Interfaces:
java.lang.Runnable
public class ManualAgent extends Agent
An interface for AI bots to implement. They are simply given a Board object indicating the positions of all pieces, the history of the game and whose turn it is, and they respond with a move, expressed as a pair of positions.
-
-
Constructor Summary
Constructors Constructor Description ManualAgent()
A no argument constructor, required for tournament management.ManualAgent(java.lang.String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
finalBoard(Board finalBoard)
Displays the final board position to the agent, if required for learning purposes.Position[]
playMove(Board board)
Play a move in the game.java.lang.String
toString()
-
-
-
Method Detail
-
playMove
public Position[] playMove(Board board)
Play a move in the game. The agent is given a Board Object representing the position of all pieces, the history of the game and whose turn it is. They respond with a move represented by a pair (two element array) of positions: the start and the end position of the move.
-
toString
public java.lang.String toString()
-
finalBoard
public void finalBoard(Board finalBoard)
Displays the final board position to the agent, if required for learning purposes. Other a default implementation may be given.- Specified by:
finalBoard
in classAgent
- Parameters:
finalBoard
- the end position of the board
-
-