// initialize game start state public void Init() { // bit board state init pieceBB[WhitePBB] = 0x000000000000FFFF; pieceBB[BlackPBB] = 0xFFFF000000000000; pieceBB[WhiteKingPBB] = 0x0000000000000010; pieceBB[BlackKingPBB] = 0x1000000000000000; pieceBB[WhiteQueenPBB] = 0x0000000000000008; pieceBB[BlackQueenPBB] = 0x0800000000000000; pieceBB[WhiteRookPBB] = 0x0000000000000081; pieceBB[BlackRookPBB] = 0x8100000000000000; pieceBB[WhiteBishopPBB] = 0x0000000000000024; pieceBB[BlackBishopPBB] = 0x2400000000000000; pieceBB[WhiteKnightPBB] = 0x0000000000000042; pieceBB[BlackKnightPBB] = 0x4200000000000000; pieceBB[WhitePawnPBB] = 0x000000000000FF00; pieceBB[BlackPawnPBB] = 0x00FF000000000000; emptyBB = 0x0000FFFFFFFF0000; occupiedBB = 0xFFFF00000000FFFF; currEnPassantTrgSq = new ChessEnPassant() { enpassantCapturSqBB = 0 }; currCastlingState = new ChessCastling() { CastlingWKSide = CastlingState.eCastling_Temporary_Disable_State, CastlingWQSide = CastlingState.eCastling_Temporary_Disable_State, CastlingBKSide = CastlingState.eCastling_Temporary_Disable_State, CastlingBQSide = CastlingState.eCastling_Temporary_Disable_State }; }
public void CopyFrom( ChessBitBoard bitBoard ) { for( int i=0; i<NumPieceBB; ++i ) { pieceBB[i] = bitBoard.pieceBB[i]; } emptyBB = bitBoard.emptyBB; occupiedBB = bitBoard.occupiedBB; currCastlingState = bitBoard.currCastlingState; currEnPassantTrgSq = bitBoard.currEnPassantTrgSq; }
public void Set( sMove move ) { this.moveType = move.moveType; this.trgSquare = move.trgSquare; this.srcSquare = move.srcSquare; this.enPassantTargetSquare = move.enPassantTargetSquare; }
public void Set( ChessBoardSquare srcSquare, ChessBoardSquare trgSquare, MoveType moveType, ChessEnPassant enPassantTrgSquare ) { this.moveType = moveType; this.trgSquare = trgSquare; this.srcSquare = srcSquare; this.enPassantTargetSquare = enPassantTrgSquare; }
public sMove( ChessBoardSquare srcSquare, ChessBoardSquare trgSquare, MoveType moveType ) { this.moveType = moveType; this.trgSquare = trgSquare; this.srcSquare = srcSquare; this.enPassantTargetSquare = new ChessEnPassant() { Rank = -1, Pile = -1, Available = false }; }
public sMove() { this.moveType = MoveType.eNone_Move; this.trgSquare = null; this.srcSquare = null; this.enPassantTargetSquare = new ChessEnPassant() { Rank = -1, Pile = -1, Available = false }; }