|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IChessAdjudicator
Defines methods required by chess adjudicators in the 3D chess framework. An adjudicator instance encapsulates the rules of a game by determining the legality of actions and when the game is over.
Method Summary | |
---|---|
int |
getPawnPromotionLevel(IChessEnvironment board,
boolean isWhite)
Return the level for pawn promotion. |
int |
getPawnPromotionRank(IChessEnvironment board,
boolean isWhite)
Return the rank for pawn promotion. |
boolean |
isCastleActionLegal(IChessEnvironment board,
IChessAgent agent,
IntegerPosition kingFromPosition,
IntegerPosition kingToPosition,
IntegerPosition rookFromPosition,
IntegerPosition rookToPosition)
Return true if the given agent action is legal in the given environment. |
boolean |
isEnPassantCaptureActionLegal(IChessEnvironment board,
IChessAgent agent,
IntegerPosition fromPosition,
IntegerPosition capturePosition,
IntegerPosition toPosition)
Return true if the given agent action is legal in the given environment. |
boolean |
isInCheck(IChessEnvironment board,
IChessAgent agent)
Return true if the given agent's King is in check. |
boolean |
isInCheckmate(IChessEnvironment board,
IChessAgent agent)
Return true if the given agent's King is in checkmate. |
boolean |
isInPawnPromotionRange(IChessEnvironment board,
IntegerPosition toPosition,
boolean isWhite)
Return true if the given position is in pawn promotion range for the given board and team. |
boolean |
isMoveActionLegal(IChessEnvironment board,
IChessAgent agent,
IntegerPosition fromPosition,
IntegerPosition toPosition)
Return true if the given agent action is legal in the given environment. |
boolean |
isMoveCaptureActionLegal(IChessEnvironment board,
IChessAgent agent,
IntegerPosition fromPosition,
IntegerPosition toPosition)
Return true if the given agent action is legal in the given environment. |
boolean |
isPawnPromotionActionLegal(IChessEnvironment board,
IChessAgent agent,
IntegerPosition fromPosition,
IntegerPosition toPosition)
Return true if the given agent action is legal in the given environment. |
boolean |
isPawnPromotionCaptureActionLegal(IChessEnvironment board,
IChessAgent agent,
IntegerPosition fromPosition,
IntegerPosition toPosition)
Return true if the given agent action is legal in the given environment. |
Methods inherited from interface org.vizzini.game.boardgame.IGridBoardAdjudicator |
---|
agentHasLine, getWinningPositions |
Methods inherited from interface org.vizzini.game.IAdjudicator |
---|
areActionsLegal, getWinner, isActionLegal, isGameOver, isGoal, reset, setWinner |
Method Detail |
---|
int getPawnPromotionLevel(IChessEnvironment board, boolean isWhite)
board
- Chess board.isWhite
- Flag indicating if the token is white.int getPawnPromotionRank(IChessEnvironment board, boolean isWhite)
board
- Chess board.isWhite
- Flag indicating if the token is white.boolean isCastleActionLegal(IChessEnvironment board, IChessAgent agent, IntegerPosition kingFromPosition, IntegerPosition kingToPosition, IntegerPosition rookFromPosition, IntegerPosition rookToPosition)
board
- Chess environment.agent
- Chess agent.kingFromPosition
- King from position.kingToPosition
- King to position.rookFromPosition
- Rook from position.rookToPosition
- Rook to position.
boolean isEnPassantCaptureActionLegal(IChessEnvironment board, IChessAgent agent, IntegerPosition fromPosition, IntegerPosition capturePosition, IntegerPosition toPosition)
board
- Chess environment.agent
- Chess agent.fromPosition
- From position.capturePosition
- Capture position.toPosition
- To position.
boolean isInCheck(IChessEnvironment board, IChessAgent agent)
board
- Chess environment.agent
- Chess agent.boolean isInCheckmate(IChessEnvironment board, IChessAgent agent)
board
- Chess environment.agent
- Chess agent.boolean isInPawnPromotionRange(IChessEnvironment board, IntegerPosition toPosition, boolean isWhite)
board
- Chess board.toPosition
- To position.isWhite
- Flag indicating if the token is white.boolean isMoveActionLegal(IChessEnvironment board, IChessAgent agent, IntegerPosition fromPosition, IntegerPosition toPosition)
board
- Chess environment.agent
- Chess agent.fromPosition
- From position.toPosition
- To position.
boolean isMoveCaptureActionLegal(IChessEnvironment board, IChessAgent agent, IntegerPosition fromPosition, IntegerPosition toPosition)
board
- Chess environment.agent
- Chess agent.fromPosition
- From position.toPosition
- To position.
boolean isPawnPromotionActionLegal(IChessEnvironment board, IChessAgent agent, IntegerPosition fromPosition, IntegerPosition toPosition)
board
- Chess environment.agent
- Chess agent.fromPosition
- From position.toPosition
- To position.
boolean isPawnPromotionCaptureActionLegal(IChessEnvironment board, IChessAgent agent, IntegerPosition fromPosition, IntegerPosition toPosition)
board
- Chess environment.agent
- Chess agent.fromPosition
- From position.toPosition
- To position.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2007 Vizzini.org. All Rights Reserved. | 2007.12.25.03.00.02 |