|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.rice.comp440.player.RandomPlayer
Class which implements a random player. This player will get the list of all available moves and return a random one.
Field Summary | |
protected java.util.Random |
random
|
Constructor Summary | |
RandomPlayer()
|
Method Summary | |
void |
lost()
Upcall to indicate that this player has lost the current game |
Move |
move(Backgammon backgammon)
Requests that the player make a move using the given backgammon setup. |
void |
won()
Upcall to indicate that this player has won the current game |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected java.util.Random random
Constructor Detail |
public RandomPlayer()
Method Detail |
public Move move(Backgammon backgammon)
backgammon
- The current backgammon situationpublic void won()
public void lost()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |