org.vizzini.game.boardgame.chess.standardtoken
Class Queen

java.lang.Object
  extended by org.vizzini.game.AbstractToken
      extended by org.vizzini.game.boardgame.chess.AbstractChessToken
          extended by org.vizzini.game.boardgame.chess.standardtoken.Queen
All Implemented Interfaces:
Serializable, Cloneable, IChessToken, IQueen, IBoardGameToken, IToken

public class Queen
extends AbstractChessToken
implements IQueen

Provides a Queen for 3D chess. This token travels in the directions of the Rook, Bishop, or Mace.

Since:
v0.3
Version:
v0.3
Author:
Jeffrey M. Thompson
See Also:
Serialized Form

Field Summary
protected static BitSet[] _possiblePositions
          Array of index to possible position bit set.
 
Fields inherited from class org.vizzini.game.boardgame.chess.AbstractChessToken
_emptyBitSet, ONES, TWOS, ZERO
 
Fields inherited from class org.vizzini.game.AbstractToken
UNKNOWN_NAME
 
Fields inherited from interface org.vizzini.game.IToken
AGENT_PROPERTY, NAME_PROPERTY, POSITION_PROPERTY, TEAM_PROPERTY
 
Constructor Summary
Queen()
          Construct this object with no agent as this token's owner.
 
Method Summary
protected static void generatePossiblePositions(IChessEnvironment board, IntegerPosition position)
          Fill the possible positions list.
 BitSet getPossibleMoveCapturePositions(IChessEnvironment board)
          Return a list of the possible move capture positions this token could take.
 BitSet getPossibleMovePositions(IChessEnvironment board)
          Return a list of the possible move positions this token could take.
protected static BitSet[] getPossiblePositionsArray(IChessEnvironment board)
          Return the possible positions array.
static void reset()
          Reset cached data.
 
Methods inherited from class org.vizzini.game.boardgame.chess.AbstractChessToken
addCastleActions, addEnPassantCaptureActions, addMoveActions, addMoveCaptureActions, addPawnPromotionActions, addPawnPromotionCaptureActions, addPossiblePosition, addPossiblePositions, configure, copy, createCastleAction, createEnPassantCaptureAction, createMoveAction, createMoveCaptureAction, createPawnPromotionAction, createPawnPromotionCaptureAction, getCounters, getEmptyBitSet, getPossibleActions, getPossibleCastlePositions, getPossibleEnPassantCapturePositions, getPossiblePawnPromotionCapturePositions, getPossiblePawnPromotionPositions, isPossibleCastlePosition, isPossibleEnPassantCapturePosition, isPossibleMoveCapturePosition, isPossibleMovePosition, isPossiblePawnPromotionCapturePosition, isPossiblePawnPromotionPosition, isWhite, setTeam
 
Methods inherited from class org.vizzini.game.AbstractToken
addPropertyChangeListener, clone, equals, getAgent, getIndex, getName, getPosition, getPropertyChangeManager, getTeam, getValue, hashCode, isFiringPositionChanges, removePropertyChangeListener, setAgent, setFiringPositionChanges, setIndex, setName, setPosition, setValue, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.vizzini.game.boardgame.chess.IChessToken
isPossibleMoveCapturePosition, isPossibleMovePosition, isWhite
 
Methods inherited from interface org.vizzini.game.boardgame.IBoardGameToken
getPossibleActions
 
Methods inherited from interface org.vizzini.game.IToken
addPropertyChangeListener, clone, configure, getAgent, getIndex, getName, getPosition, getTeam, getValue, removePropertyChangeListener, setAgent, setName, setPosition, setTeam, setValue
 

Field Detail

_possiblePositions

protected static BitSet[] _possiblePositions
Array of index to possible position bit set.

Constructor Detail

Queen

public Queen()
Construct this object with no agent as this token's owner.

Since:
v0.3
Method Detail

reset

public static void reset()
Reset cached data.

Since:
v0.3

getPossibleMoveCapturePositions

public BitSet getPossibleMoveCapturePositions(IChessEnvironment board)
Return a list of the possible move capture positions this token could take.

Specified by:
getPossibleMoveCapturePositions in interface IChessToken
Parameters:
board - Chess board.
Since:
v0.3

getPossibleMovePositions

public BitSet getPossibleMovePositions(IChessEnvironment board)
Return a list of the possible move positions this token could take.

Specified by:
getPossibleMovePositions in interface IChessToken
Parameters:
board - Chess board.
Since:
v0.3

generatePossiblePositions

protected static void generatePossiblePositions(IChessEnvironment board,
                                                IntegerPosition position)
Fill the possible positions list.

Parameters:
board - Grid board environment.
position - Token position.
Since:
v0.3

getPossiblePositionsArray

protected static BitSet[] getPossiblePositionsArray(IChessEnvironment board)
Return the possible positions array.

Since:
v0.3


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