|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.moyoman.helper.Helper | +--org.moyoman.helper.board.rules.RulesHelper
Classes which extend this one help the Board module. They are used in determining legal and illegal moves for various rule sets.
Field Summary |
Fields inherited from class org.moyoman.helper.Helper |
|
Constructor Summary | |
RulesHelper(GameId gid,
Mode mode,
HelperName name,
Component parent)
Create the RulesHelper object. |
Method Summary | |
abstract boolean |
doCountPointsInSeki()
Determine if territory in a seki is counted. |
abstract Set |
findPrisoners(Board board)
Find the prisoners that should be removed. |
abstract boolean |
freePlacementOfHandicapStones()
Determine if handicap stones must be placed in a set pattern. |
abstract Stone |
getKo()
Get the move that would be illegal due to immediately retaking a ko. |
abstract float |
getKomi()
Get the komi. |
abstract short |
getLegalityStatus(NumberedStone ns,
Board board)
Determine the status of the given move. |
abstract Rules |
getRules()
Determine the type of rules for this game. |
abstract Stone[] |
getSuicide()
Get the moves which would be illegal due to suicide on the next move. |
abstract Stone[] |
getSuperKo()
Get the moves that would be illegal because of recreating a whole board position. |
abstract boolean |
isBentFourDeadByRule()
Determine if the bent four group is dead by rule, or must be played out. |
abstract boolean |
isLegalMove(NumberedStone ns,
Board board)
Determine if the given move is legal. |
abstract boolean |
isSuicideAllowed()
Determine if suicide is allowed. |
abstract boolean |
isTerritoryScoring()
Determine if territory (Japanese) or area (Chinese) scoring is used. |
abstract void |
makeMove(Board board)
Update the RulesHelper with the latest move. |
abstract boolean |
mustWhiteMoveLast()
Determine if white must move last. |
abstract short |
numberOfPassesToEndGame()
Determine the number of consecutive passes that ends the game. |
abstract short |
superKoRule()
Determine the type of super ko rule in effect. |
Methods inherited from class org.moyoman.helper.Helper |
checkTime, clone, create, createHelper, debug, error, error, fatal, fatal, getAllHelpers, getDebugInformation, getDebugTypes, getHelper, getHelperName, getId, getMode, getModule, getParent, getRequiredModuleList, getScheduler, information, setTime, warning, warning |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RulesHelper(GameId gid, Mode mode, HelperName name, Component parent) throws InternalErrorException
gid
- The game id.mode
- The mode of the game.name
- The name of the specific helper.parent
- The Board object.
InternalErrorException
- Thrown if the operation fails for any reason.Method Detail |
public abstract boolean doCountPointsInSeki()
public abstract boolean freePlacementOfHandicapStones()
public abstract float getKomi()
public abstract boolean isBentFourDeadByRule()
public abstract boolean isSuicideAllowed()
public abstract boolean isTerritoryScoring()
public abstract boolean mustWhiteMoveLast()
public abstract short numberOfPassesToEndGame()
public abstract short superKoRule()
public abstract Stone[] getSuicide()
public abstract Stone getKo()
public abstract Stone[] getSuperKo()
public abstract boolean isLegalMove(NumberedStone ns, Board board)
ns
- The move being tested.board
- The Board object with the current board position.
public abstract short getLegalityStatus(NumberedStone ns, Board board)
ns
- The move being tested.board
- The Board object with the current board position.
public abstract void makeMove(Board board)
board
- The Board object which contains the state of the board.public abstract Set findPrisoners(Board board)
board
- The Board object with the current state of the board with prisoners still present.
public abstract Rules getRules()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |