|
|||||||||||
| 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.reference.MousePlayer
Provides an implementation of NonvalidatedPlayer to allow mouse
input.
| Field Summary | |
private Move |
_move
Current move. |
private short |
_moveNumber
Current move number. |
private IMoyoman |
_owner
Owner. |
private static boolean |
DEBUG
|
| Fields inherited from class org.moyoman.comm.client.NonvalidatedPlayer |
|
| Fields inherited from class org.moyoman.comm.client.Player |
color, handicap |
| Constructor Summary | |
MousePlayer(IMoyoman owner,
Color c,
Handicap h)
Construct this object with the given parameters. |
|
MousePlayer(IMoyoman owner,
Color c,
Handicap h,
String id)
|
|
| Method Summary | |
protected String |
getHomeDirectory()
Return the home directory. |
String |
getIdentifyingInfo()
Return identifying information about this player. |
protected Move |
getRequestedMove()
The derived class must override this method to get a move from the player. |
protected void |
makeValidatedMove(MoveDescriptor md)
The derived class must override this method to make a move. |
void |
mouseClicked(MouseEvent event)
Respond to a mouse click. |
void |
mouseEntered(MouseEvent event)
Implement the mouse listener inteface. |
void |
mouseExited(MouseEvent event)
Implement the mouse listener inteface. |
void |
mousePressed(MouseEvent event)
Implement the mouse listener inteface. |
void |
mouseReleased(MouseEvent event)
Implement the mouse listener inteface. |
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, isSelfInitializingUser, 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 static final boolean DEBUG
private IMoyoman _owner
private Move _move
private short _moveNumber
| Constructor Detail |
public MousePlayer(IMoyoman owner,
Color c,
Handicap h)
throws InternalErrorException
owner - The owner.c - The color of the player.h - The handicap of the game.
InternalErrorException - Thrown if the operation fails for any reason.
public MousePlayer(IMoyoman owner,
Color c,
Handicap h,
String id)
throws InternalErrorException
| Method Detail |
public String getIdentifyingInfo()
getIdentifyingInfo in class Playerpublic void mouseClicked(MouseEvent event)
mouseClicked in interface MouseListenerpublic void mouseEntered(MouseEvent event)
mouseEntered in interface MouseListenerevent - A mouse event.public void mouseExited(MouseEvent event)
mouseExited in interface MouseListenerevent - A mouse event.public void mousePressed(MouseEvent event)
mousePressed in interface MouseListenerevent - A mouse event.public void mouseReleased(MouseEvent event)
mouseReleased in interface MouseListenerevent - A mouse event.protected String getHomeDirectory()
protected void setIllegalMoves(Stone[] moves)
moves - An array of Stone objects which are illegal moves.protected 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 Move getRequestedMove()
getRequestedMove in class NonvalidatedPlayer
protected void makeValidatedMove(MoveDescriptor md)
throws IllegalMoveException,
InternalErrorException
makeValidatedMove in class NonvalidatedPlayermd - The move to be made.
Exception - Thrown if the operation fails for any reason.
InternalErrorException - Thrown if the operation fails for any reason.
IllegalMoveException - - Thrown if the move to be made is illegal.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||