Packagecom.godpaper.as3.impl
Classpublic class AbstractChessVO
InheritanceAbstractChessVO Inheritance BitBoard Inheritance BitVector Inheritance Object
Implements com.godpaper.as3.core.IChessVO
Subclasses ChessVO_TicTacToe

See also

http://chessprogramming.wikispaces.com/X-ray+Attacks
http://chessprogramming.wikispaces.com/Classical+Approach
http://www.nicolabortignon.com/as3-bitwise-operations/


Public Properties
 PropertyDefined By
 InheritedbitCount : int
[read-only] The total number of bits.
BitVector
  captures : BitBoard
AbstractChessVO
 InheritedcellCount : int
[read-only] The total number of cells.
BitVector
 Inheritedcelled : int
[read-only]
BitBoard
 Inheritedcolumn : int
[read-only]
BitBoard
  defends : BitBoard
AbstractChessVO
 InheritedisEmpty : Boolean
[read-only] whether or not bitboard is empty;
BitBoard
  moves : BitBoard
AbstractChessVO
  occupies : BitBoard
AbstractChessVO
 Inheritedrow : int
[read-only]
BitBoard
Protected Properties
 PropertyDefined By
  blocker : BitBoard
AbstractChessVO
  chessGasketModel : ChessGasketsModel
AbstractChessVO
  chessPiecesModel : ChessPiecesModel
AbstractChessVO
  flag : int
AbstractChessVO
  identifier : String
AbstractChessVO
Public Methods
 MethodDefined By
  
AbstractChessVO(width:int, height:int, rowIndex:int, colIndex:int, flag:uint = 1, identifier:String)
Customize construct the abstracted chess vo with parameters.
AbstractChessVO
 Inherited
BitBoard
 Inherited
clear():void
[override] Resets all bits to 0;
BitBoard
 Inherited
BitBoard
 Inherited
dump():String
Dump out a string representing the current object.
BitBoard
 Inherited
getBit(index:int):int
Gets a bit from a given index.
BitVector
 Inherited
getBitt(row:int, column:int):int
Gets a bit from a given row and column.
BitBoard
 Inherited
getCols(colIndex:int):Array
BitBoard
  
getEast(rowIndex:int, colIndex:int):BitBoard
AbstractChessVO
  
getNorth(rowIndex:int, colIndex:int):BitBoard
AbstractChessVO
 Inherited
getRows(rowIndex:int):Array
BitBoard
  
getSouth(rowIndex:int, colIndex:int):BitBoard
AbstractChessVO
  
getWest(rowIndex:int, colIndex:int):BitBoard
AbstractChessVO
  
initialization(rowIndex:int, colIndex:int, flag:uint = 0, identifier:String):void
AbstractChessVO
 Inherited
BitBoard
 Inherited
BitBoard
 Inherited
resize(size:int):void
Resizes the bit-vector to an appropriate number of bits.
BitVector
 Inherited
BitBoard
 Inherited
notice:this function is suitable for which board column equals to row.
BitBoard
 Inherited
BitBoard
 Inherited
setAll():void
[override] Sets each bit to 1.
BitBoard
 Inherited
setBit(index:int, b:Boolean):void
Sets a bit at a given index.
BitVector
 Inherited
setBitt(row:int, column:int, b:Boolean):void
Sets a bit at a given row and column.
BitBoard
 Inherited
toString():String
[override] Prints out a string representing the current object.
BitBoard
 Inherited
BitBoard
Property Detail
blockerproperty
protected var blocker:BitBoard

capturesproperty 
captures:BitBoard


Implementation
    public function get captures():BitBoard
    public function set captures(value:BitBoard):void
chessGasketModelproperty 
protected var chessGasketModel:ChessGasketsModel

chessPiecesModelproperty 
protected var chessPiecesModel:ChessPiecesModel

defendsproperty 
defends:BitBoard


Implementation
    public function get defends():BitBoard
    public function set defends(value:BitBoard):void
flagproperty 
protected var flag:int

identifierproperty 
protected var identifier:String

movesproperty 
moves:BitBoard


Implementation
    public function get moves():BitBoard
    public function set moves(value:BitBoard):void
occupiesproperty 
occupies:BitBoard


Implementation
    public function get occupies():BitBoard
    public function set occupies(value:BitBoard):void
Constructor Detail
AbstractChessVO()Constructor
public function AbstractChessVO(width:int, height:int, rowIndex:int, colIndex:int, flag:uint = 1, identifier:String)

Customize construct the abstracted chess vo with parameters.

Parameters
width:int — width value of bitboard;
 
height:int — height value of bitboard;
 
rowIndex:int — rowIndex of destination point;
 
colIndex:int — colIndex of destination point;
 
flag:uint (default = 1) — flag you wanna set(red is 0,blue is 1).
 
identifier:String — identifier of ChessVO.
Method Detail
getEast()method
public function getEast(rowIndex:int, colIndex:int):BitBoard

Parameters

rowIndex:int — current piece's row index.
 
colIndex:int — current piece's column index.

Returns
BitBoard — legal moves prototype is bit board under east direction.
getNorth()method 
public function getNorth(rowIndex:int, colIndex:int):BitBoard

Parameters

rowIndex:int — current piece's row index.
 
colIndex:int — current piece's column index.

Returns
BitBoard — legal moves prototype is bit board under north direction.
getSouth()method 
public function getSouth(rowIndex:int, colIndex:int):BitBoard

Parameters

rowIndex:int — current piece's row index.
 
colIndex:int — current piece's column index.

Returns
BitBoard — legal moves prototype is bit board under south direction.
getWest()method 
public function getWest(rowIndex:int, colIndex:int):BitBoard

Parameters

rowIndex:int — current piece's row index.
 
colIndex:int — current piece's column index.

Returns
BitBoard — legal moves prototype is bit board under west direction.
initialization()method 
public function initialization(rowIndex:int, colIndex:int, flag:uint = 0, identifier:String):void

Parameters

rowIndex:int — rowIndex you wanna set bit flag.
 
colIndex:int — colIndex you wanna set big flag.
 
flag:uint (default = 0) — flag you wanna set(red is 0,blue is 1).
 
identifier:String — identifier of ChessVO.

See also

mx.utils.BitFlagUtil.update