|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--org.moyoman.comm.client.Player
|
+--org.moyoman.comm.client.NonvalidatedPlayer
|
+--org.moyoman.client.cli.CliPlayer
| Field Summary | |
private short |
moveNumber
|
| Fields inherited from class org.moyoman.comm.client.NonvalidatedPlayer |
|
| Fields inherited from class org.moyoman.comm.client.Player |
color, handicap |
| Constructor Summary | |
CliPlayer(Color c,
Handicap h)
Create the NonvalidatedPlayer object. |
|
| Method Summary | |
String |
getIdentifyingInfo()
Return a String which identifies the player. |
protected Move |
getRequestedMove()
The derived class must override this method to get a move from the player. |
boolean |
isSelfInitializingUser()
Return whether the player initializes itself on startup. |
protected void |
makeValidatedMove(MoveDescriptor md)
The derived class must override this method to make a move. |
protected void |
setIllegalMoves(Stone[] moves)
This method sets the moves that are illegal, excluding the ko. |
protected void |
setKo(Stone ko)
This method sets the move that is illegal because it immediately retakes the ko. |
| Methods inherited from class org.moyoman.comm.client.NonvalidatedPlayer |
derivedMakeMove, derivedRequestMove, getGameRecord, getId, getKo, getMoveNumber, isValidatedUser, validateMove |
| Methods inherited from class org.moyoman.comm.client.Player |
getColor, getHandicap, makeMove, makeMoveNoEvents, registerEndOfGameMoveListener, registerMakeMoveListener, registerRequestMoveListener, requestMove, unregisterEndOfGameListeners, unregisterMakeMoveListeners, unregisterRequestMoveListeners |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private short moveNumber
| Constructor Detail |
public CliPlayer(Color c,
Handicap h)
throws Exception
c - The color of the player.h - The handicap of the game.
Exception - Thrown if the operation fails for any reason.| Method Detail |
protected void makeValidatedMove(MoveDescriptor md)
throws IllegalMoveException,
InternalErrorException
NonvalidatedPlayer
makeValidatedMove in class NonvalidatedPlayermd - The move to be made.
InternalErrorException - Thrown if the operation fails for any reason.
IllegalMoveException - - Thrown if the move to be made is illegal.protected Move getRequestedMove()
NonvalidatedPlayer
getRequestedMove in class NonvalidatedPlayerprotected void setKo(Stone ko)
ko - The stone which is an illegal move without making a ko threat.
This parameter may be null if there is no ko.protected void setIllegalMoves(Stone[] moves)
moves - An array of Stone objects which are illegal moves.public boolean isSelfInitializingUser()
Player
isSelfInitializingUser in class NonvalidatedPlayerpublic String getIdentifyingInfo()
Player
getIdentifyingInfo in class Player
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||