org.vizzini.game.boardgame.chess
Interface IChessEnvironment

All Superinterfaces:
Cloneable, IEnvironment, IGridBoard, Serializable
All Known Implementing Classes:
AbstractChessEnvironment, DefaultChessEnvironment

public interface IChessEnvironment
extends IGridBoard

Defines methods required by chess environments in the 3D chess framework.

Since:
v0.3
Version:
v0.3
Author:
Jeffrey M. Thompson

Method Summary
 void addCheckListener(ICheckListener listener)
          Add the given listener.
 IChessAgent getAgent(boolean isWhite)
          Return the proper agent for the given flag.
 IChessAgent getAgentBlack()
          Return the agent for the black team.
 IChessAgent getAgentWhite()
          Return the agent for the white team.
 int getEnPassantRank(boolean isWhite)
          Return the en passant capture rank (if any) for the given parameter.
 List getHintPositionsFor(IntegerPosition position, IAdjudicator adjudicator)
          Return the hint positions for the given position.
 IntegerPosition getInitialKingPosition(boolean isWhite)
          Return the initial King position.
 IntegerPosition getInitialKingsRookPosition(boolean isWhite)
          Return the initial King's rook position.
 IntegerPosition getInitialQueensRookPosition(boolean isWhite)
          Return the initial Queen's rook position.
 int getKingsCastleDeltaFile(boolean isKingSide)
          Return the King's delta file for either king-side or queen-side castling.
 IChessAgent getOpponent(IChessAgent agent)
          Return the opposing agent to the given agent.
 int getRooksCastleDeltaFile(boolean isKingSide)
          Return the Rook's delta file for either king-side or queen-side castling.
 ITeam getTeamBlack()
          Return the team for black.
 ITeam getTeamWhite()
          Return the team for white.
 boolean isCastlingAllowed()
          Return true if this environment allows castling.
 boolean isEnPassantCaptureAllowed()
          Return true if this environment allows en passant capture.
 boolean isFiringChecks()
          Return true if this is set to fire check events.
 boolean isInitialPosition(Class tokenClass, ITeam team, IntegerPosition position)
          Return true if the given coordinates are the initial position for a token of the given class.
 boolean isPawnInitialPosition(ITeam team, IntegerPosition position)
          Return true if the given coordinates are the initial position for a Pawn.
 void removeCheckListener(ICheckListener listener)
          Remove the given listener.
 void setFiringChecks(boolean fire)
          Set the flag which indicates whether to fire state change events.
 
Methods inherited from interface org.vizzini.game.boardgame.IGridBoard
agentTokenCount, coordsToIndex, get, getCellCount, getFileCount, getLastAgent, getLevelCount, getMaxDimension, getRankCount, indexToFile, indexToLevel, indexToPosition, indexToRank, is3D, isActionHistoryUsed, isPositionUsable, isPositionUsable, isRedoAllowed, isUndoAllowed, positionToIndex, setActionHistoryUsed, setToken, setToken
 
Methods inherited from interface org.vizzini.game.IEnvironment
addStateListener, clone, configure, copy, get, getAdjudicator, getAgentCollection, getTeamCollection, getTokenCollection, getTurnNumber, incrementTurnNumber, isFiringStateChanges, open, performAction, performActions, removeStateListener, reset, setAdjudicator, setAgentCollection, setFiringStateChanges, setTurnNumber, undoAction, update
 

Method Detail

addCheckListener

void addCheckListener(ICheckListener listener)
Add the given listener.

Since:
v0.3

getAgent

IChessAgent getAgent(boolean isWhite)
Return the proper agent for the given flag.

Parameters:
isWhite - Flag indicating whether to return the white agent.
Since:
v0.3

getAgentBlack

IChessAgent getAgentBlack()
Return the agent for the black team.

Since:
v0.3

getAgentWhite

IChessAgent getAgentWhite()
Return the agent for the white team.

Since:
v0.3

getEnPassantRank

int getEnPassantRank(boolean isWhite)
Return the en passant capture rank (if any) for the given parameter.

Parameters:
isWhite - Flag indicating whether White or Black.
Returns:
the en passant capture rank, or -1 if there is none.

getHintPositionsFor

List getHintPositionsFor(IntegerPosition position,
                         IAdjudicator adjudicator)
Return the hint positions for the given position.

Since:
v0.3

getInitialKingPosition

IntegerPosition getInitialKingPosition(boolean isWhite)
Return the initial King position.

Since:
v0.3

getInitialKingsRookPosition

IntegerPosition getInitialKingsRookPosition(boolean isWhite)
Return the initial King's rook position.

Since:
v0.3

getInitialQueensRookPosition

IntegerPosition getInitialQueensRookPosition(boolean isWhite)
Return the initial Queen's rook position.

Since:
v0.3

getKingsCastleDeltaFile

int getKingsCastleDeltaFile(boolean isKingSide)
Return the King's delta file for either king-side or queen-side castling.

Since:
v0.3

getOpponent

IChessAgent getOpponent(IChessAgent agent)
Return the opposing agent to the given agent.

Since:
v0.3

getRooksCastleDeltaFile

int getRooksCastleDeltaFile(boolean isKingSide)
Return the Rook's delta file for either king-side or queen-side castling.

Since:
v0.3

getTeamBlack

ITeam getTeamBlack()
Return the team for black.

Since:
v0.3

getTeamWhite

ITeam getTeamWhite()
Return the team for white.

Since:
v0.3

isCastlingAllowed

boolean isCastlingAllowed()
Return true if this environment allows castling.

Since:
v0.3

isEnPassantCaptureAllowed

boolean isEnPassantCaptureAllowed()
Return true if this environment allows en passant capture.

Since:
v0.3

isFiringChecks

boolean isFiringChecks()
Return true if this is set to fire check events.

Since:
v0.3

isInitialPosition

boolean isInitialPosition(Class tokenClass,
                          ITeam team,
                          IntegerPosition position)
Return true if the given coordinates are the initial position for a token of the given class.

Since:
v0.3

isPawnInitialPosition

boolean isPawnInitialPosition(ITeam team,
                              IntegerPosition position)
Return true if the given coordinates are the initial position for a Pawn.

Since:
v0.3

removeCheckListener

void removeCheckListener(ICheckListener listener)
Remove the given listener.

Since:
v0.3

setFiringChecks

void setFiringChecks(boolean fire)
Set the flag which indicates whether to fire state change events.

Since:
v0.3


Copyright © 2007 Vizzini.org. All Rights Reserved. 2007.12.25.03.00.02