|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.anji.ttt.TttBadPlayer
"Bad" tic-tac-toe subject. See move()
for details.
Constructor Summary | |
TttBadPlayer()
|
Method Summary | |
java.lang.String |
getPlayerId()
|
void |
init(Properties props)
|
int |
move(int[] boardState)
Plays randomly in first open side space. |
void |
reset()
reset player state; after a call to reset, the player should be in the same state as it was when created; i.e., it has no memory of previous games played |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public TttBadPlayer()
Method Detail |
public java.lang.String getPlayerId()
getPlayerId
in interface Player
Player.getPlayerId()
public int move(int[] boardState)
move
in interface BoardPlayer
boardState
-
BoardPlayer.move(int[])
public void init(Properties props) throws java.lang.Exception
init
in interface Configurable
props
- configuration parameters
java.lang.Exception
Configurable.init(com.anji.util.Properties)
public void reset()
Player
reset
in interface Player
Player.reset()
public java.lang.String toString()
Object.toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |