Packagecom.godpaper.as3.business.managers
Classpublic class ChessPiecesManagerDefault
InheritanceChessPiecesManagerDefault Inheritance Object
Implements com.godpaper.as3.core.IChessPieceManager
Subclasses ChessPiecesManager_TicTacToe

The default chess piece manager, manage chess piece move's validation/makeMove/unMakeMove. Also a way for the originator to be responsible for saving and restoring its states.



Public Properties
 PropertyDefined By
  eatOffs : Vector.<ChessPiece>
return the eaten chess pieces.
ChessPiecesManagerDefault
  isChecking : Boolean
return isChecking value.
ChessPiecesManagerDefault
  memento : ChessPiecesMemento
ChessPiecesManagerDefault
  previousMementos : Array
[read-only]
ChessPiecesManagerDefault
Protected Properties
 PropertyDefined By
  chessBoardModel : ChessBoardModel
ChessPiecesManagerDefault
  chessGaketsModel : ChessGasketsModel
ChessPiecesManagerDefault
  chessPiecesModel : ChessPiecesModel
ChessPiecesManagerDefault
  currentRemovedPieceIndexs : Vector.<int>
[read-only]
ChessPiecesManagerDefault
  currentRemovedPieces : Vector.<ChessPiece>
ChessPiecesManagerDefault
Public Methods
 MethodDefined By
  
applyMove(conductVO:ConductVO):void
Apply make move data and piece entity change behaviors,to be overrided.
ChessPiecesManagerDefault
  
ChessPiecesManagerDefault
  
doMoveValidation(conductVO:ConductVO):Boolean
ChessPiecesManagerDefault
  
indicateCheck(pieces:Vector.<ChessPiece>, marshal:BitBoard):Boolean
ChessPiecesManagerDefault
  
indicateCheckmate(gamePosition:PositionVO):Boolean
ChessPiecesManagerDefault
  
indicateGasketsCapture(legalCaptures:BitBoard):void
ChessPiecesManagerDefault
  
indicateGasketsMove(legalMoves:BitBoard):void
ChessPiecesManagerDefault
  
makeMove(conductVO:ConductVO):void
Make Move is a function inside a chess program to update the internal chess position and its Board representation as well as associated or dependent state variables and data by a move made on the internal board, such as zobrist keys to index the transposition table.
ChessPiecesManagerDefault
  
noneMove():int
Plugin to death,results to human or computer win. return the game status code.
ChessPiecesManagerDefault
  
unmakeMove(conductVO:ConductVO):void
Unmake Move is a function inside a chess program to update the internal chess position and its Board representation as well as associated or dependent state variables and data by a move unmade on the internal board.
ChessPiecesManagerDefault
  
willNoneMove(gamePosition:PositionVO):Boolean
ChessPiecesManagerDefault
Protected Methods
 MethodDefined By
  
ChessPiecesManagerDefault
  
ChessPiecesManagerDefault
  
ChessPiecesManagerDefault
  
ChessPiecesManagerDefault
Property Detail
chessBoardModelproperty
protected var chessBoardModel:ChessBoardModel

chessGaketsModelproperty 
protected var chessGaketsModel:ChessGasketsModel

chessPiecesModelproperty 
protected var chessPiecesModel:ChessPiecesModel

currentRemovedPieceIndexsproperty 
currentRemovedPieceIndexs:Vector.<int>  [read-only]


Implementation
    protected function get currentRemovedPieceIndexs():Vector.<int>
currentRemovedPiecesproperty 
protected var currentRemovedPieces:Vector.<ChessPiece>

eatOffsproperty 
eatOffs:Vector.<ChessPiece>

return the eaten chess pieces.


Implementation
    public function get eatOffs():Vector.<ChessPiece>
    public function set eatOffs(value:Vector.<ChessPiece>):void
isCheckingproperty 
isChecking:Boolean

return isChecking value.


Implementation
    public function get isChecking():Boolean
    public function set isChecking(value:Boolean):void
mementoproperty 
memento:ChessPiecesMemento


Implementation
    public function get memento():ChessPiecesMemento
    public function set memento(value:ChessPiecesMemento):void
previousMementosproperty 
previousMementos:Array  [read-only]


Implementation
    public function get previousMementos():Array
Method Detail
applyMove()method
public function applyMove(conductVO:ConductVO):void

Apply make move data and piece entity change behaviors,to be overrided.

Parameters

conductVO:ConductVO

blueSideHandler()method 
protected function blueSideHandler():void

calculatePieceIndex()method 
public function calculatePieceIndex(chessPiece:ChessPiece):int

Parameters

chessPiece:ChessPiece

Returns
int

Throws
DefaultErrors
doMoveValidation()method 
public function doMoveValidation(conductVO:ConductVO):Boolean

Parameters

conductVO:ConductVO — the conduct value object of moving chess piece.

Returns
Boolean — current chess piece's move validation result.
greenSideHandler()method 
protected function greenSideHandler():void

indicateCheck()method 
public function indicateCheck(pieces:Vector.<ChessPiece>, marshal:BitBoard):Boolean

Parameters

pieces:Vector.<ChessPiece> — execute check mate's chess pieces.
 
marshal:BitBoard — blues'/reds' marshal bitboard.

Returns
Boolean — the result of check pattern,if neccessary.
indicateCheckmate()method 
public function indicateCheckmate(gamePosition:PositionVO):Boolean

Parameters

gamePosition:PositionVO — the current blue/red game position.

Returns
Boolean — whether or not blue/red check mated.
indicateGasketsCapture()method 
public function indicateGasketsCapture(legalCaptures:BitBoard):void

Parameters

legalCaptures:BitBoard — current chess piece's legal moves.

See also

Main.application1_creationCompleteHandler.createGasket().
indicateGasketsMove()method 
public function indicateGasketsMove(legalMoves:BitBoard):void

Parameters

legalMoves:BitBoard — current chess piece's legal moves.

See also

Main.application1_creationCompleteHandler.createGasket().
makeMove()method 
public function makeMove(conductVO:ConductVO):void

Make Move is a function inside a chess program to update the internal chess position and its Board representation as well as associated or dependent state variables and data by a move made on the internal board, such as zobrist keys to index the transposition table. That usually happens inside the Search algorithm, where the move acts like an edge connecting two nodes of a search tree, a parent and a child node. Dependent on the design of the data structures and the used search algorithms there are different approaches with respect to randomly accessing aspects of nodes and restoring the position while unmaking the move.

Parameters

conductVO:ConductVO — the conduct value object of moving chess piece.

See also

noneMove()method 
public function noneMove():int

Plugin to death,results to human or computer win. return the game status code.

Returns
int
redSideHandler()method 
protected function redSideHandler():void

unmakeMove()method 
public function unmakeMove(conductVO:ConductVO):void

Unmake Move is a function inside a chess program to update the internal chess position and its Board representation as well as associated or dependent state variables and data by a move unmade on the internal board. In unmake move, reversible aspects of a position can be incrementally updated by the inverse or own inverse operation of Make Move. Irreversible aspects of a position, such as ep state, castling rights and the halfmove clock are either restored from a stack (LIFO), or simply kept in arrays indexed by current search or game ply. Alternatively, one may capacitate the move with all the necessary information to recover those irreversible aspects of a position as well.

Parameters

conductVO:ConductVO — the conduct value object of moving chess piece.

See also

updateTasksProcess()method 
protected function updateTasksProcess():void

willNoneMove()method 
public function willNoneMove(gamePosition:PositionVO):Boolean

Parameters

gamePosition:PositionVO

Returns
Boolean