|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--edu.lhup.ai.RandomPlayer
A concrete player that plays any game by selecting a random move from the set of currently legal moves.
This software is for educational purposes only.
| Constructor Summary | |
RandomPlayer()
|
|
| Method Summary | |
String |
getDescription()
|
String |
getShortDescription()
|
void |
setCutoff(int cutoff)
Provides a mechanism for specifying the point at which a player's abandons the search for the best move. |
void |
setEvaluator(IEvaluator evaluator)
Provides a mechanism for specifying a player's evaluation strategy. |
void |
takeTurn(IBoard board)
Selects a random move from the set of currently legal moves. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public RandomPlayer()
| Method Detail |
public String getDescription()
getDescription in interface IPlayerpublic String getShortDescription()
getShortDescription in interface IPlayerpublic void setEvaluator(IEvaluator evaluator)
IPlayerIEvaluator interface programmers can create
their own custom evaluators and request that a player use the evaluator
by calling this method.
setEvaluator in interface IPlayerevaluator - the strategy used by this player in order to
evaluate the current game state.public void setCutoff(int cutoff)
IPlayer
setCutoff in interface IPlayercutoff - an integer limiting the duration of a player's search for
the best move
public void takeTurn(IBoard board)
throws TurnException
takeTurn in interface IPlayerboard - the IBoard object that this player will make a move
on.
TurnException - if for some strange reason the selected move
turns out not to be legal.public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||