|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.moyoman.framework.Controller | +--org.moyoman.framework.ValidateController
This class is used to validate moves for players which do not do so themselves.
Field Summary |
Fields inherited from class org.moyoman.framework.Controller |
gr, id, persister, scheduler |
Constructor Summary | |
private |
ValidateController(Color color,
Handicap handicap,
Mode mode)
Create a new ValidateController object. |
private |
ValidateController(Color color,
Handicap handicap,
Mode mode,
Rules rules,
float komi)
Create a new ValidateController object. |
Method Summary | |
static ValidateController |
newGame(Color color,
Handicap handicap,
Mode mode)
Start a new game with the specified parameters. |
static ValidateController |
newGame(Color color,
Handicap handicap,
Mode mode,
Rules rules,
float komi)
Start a new game with the specified parameters. |
private MoveDescriptor |
validateMove(Move move)
Verify that this move is a legal one. |
MoveDescriptor |
validateMove(Stone stone)
Verify that this move is a legal one. |
Methods inherited from class org.moyoman.framework.Controller |
deleteGame, endGame, gameExists, getColor, getController, getGameRecord, getHandicap, getId, getKomi, getLastMoveKo, getMode, getMode, getMoveNumber, getPersister, getProperties, getRules, getRules, getSuicideMoves, getSuperKoMoves, listActiveGames, listSavedGames, loadGame, makeMove, onExit, pass, resignGame, resumeActiveGame, resumeActiveGame, saveGame, setProperties, takeBackMove, writeLastGameInformation |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
private ValidateController(Color color, Handicap handicap, Mode mode, Rules rules, float komi) throws InternalErrorException
color
- The color of the player using the server to play this game.handicap
- The handicap of this game.mode
- The mode used by the player using the server to play this game.rules
- The rules for this game.komi
- The komi for this game.
InternalErrorException
- Thrown if the operation fails for any reason.private ValidateController(Color color, Handicap handicap, Mode mode) throws InternalErrorException
color
- The color of the player using the server to play this game.handicap
- The handicap of this game.mode
- The mode used by the player using the server to play this game.
InternalErrorException
- Thrown if the operation fails for any reason.Method Detail |
public MoveDescriptor validateMove(Stone stone) throws IllegalMoveException, InternalErrorException
stone
- The move that was made.
IllegalMoveException
- Thrown if the move to be made is not legal.
InternalErrorException
- Thrown if the operation fails for any reason.private MoveDescriptor validateMove(Move move) throws IllegalMoveException, InternalErrorException
move
- The move to be verified.
IllegalMoveException
- Thrown if the move to be made is not legal.
InternalErrorException
- Thrown if the operation fails for any reason.public static ValidateController newGame(Color color, Handicap handicap, Mode mode, Rules rules, float komi) throws InternalErrorException
color
- The color of the clienthandicap
- The handicap to be used.mode
- The mode of play.rules
- The rule set, e.g, Japanesekomi
- The komi to be used. A positive value is
added to whites score, a negative value subtracted from it.
InternalErrorException
- Thrown if the operation fails for any reason.public static ValidateController newGame(Color color, Handicap handicap, Mode mode) throws InternalErrorException
color
- The color of the clienthandicap
- The handicap to be used.mode
- The mode of play.
InternalErrorException
- Thrown if the operation fails for any reason.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |