|
|||||||||||
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.GenerateController
This is the Controller class that controls the generation of moves by the server and the associated operations.
Field Summary |
Fields inherited from class org.moyoman.framework.Controller |
gr, id, persister, scheduler |
Constructor Summary | |
GenerateController(Color color,
Handicap handicap,
Mode mode)
|
|
GenerateController(Color color,
Handicap handicap,
Mode mode,
Rules rules,
float komi)
|
Method Summary | |
MoveDescriptor |
generateMove()
Get the servers move in the specified game. |
Debug[] |
getDebuggingInfo(ModuleName modulename,
DebugType[] types)
Get the debugging information for the specified module. |
MoveDescriptor |
getSuggestedMove()
Suggest a move for the client. |
ModuleName[] |
listDebuggingModules(DebugType[] types)
Get a list of all of the modules for which debugging information is available. |
static GenerateController |
newGame(Color color,
Handicap handicap,
Mode mode)
Start a new game with the specified parameters. |
static GenerateController |
newGame(Color color,
Handicap handicap,
Mode mode,
Rules rules,
float komi)
Start a new game with the specified parameters. |
BooleanResponse |
requestResignation()
The client is requesting that the server resign the specified game. |
void |
resignGame()
The client is resigning the specified game. |
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, 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 |
public GenerateController(Color color, Handicap handicap, Mode mode) throws InternalErrorException
public GenerateController(Color color, Handicap handicap, Mode mode, Rules rules, float komi) throws InternalErrorException
Method Detail |
public MoveDescriptor generateMove() throws InternalErrorException
InternalErrorException
- Thrown if the operation fails for any reason.public Debug[] getDebuggingInfo(ModuleName modulename, DebugType[] types) throws InternalErrorException
modulename
- The module for which the information is returned.
InternalErrorException
- Thrown if the operation fails for any reason.public MoveDescriptor getSuggestedMove() throws InternalErrorException
InternalErrorException
- Thrown if the operation fails for any reason.public ModuleName[] listDebuggingModules(DebugType[] types) throws InternalErrorException
types
- An array of debugging types that the client understands.
InternalErrorException
- Thrown if the operation fails for any reason.public static GenerateController 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 GenerateController 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.public BooleanResponse requestResignation() throws InternalErrorException
InternalErrorException
- Thrown if the operation fails for any reason.public void resignGame() throws InternalErrorException
resignGame
in class Controller
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 |