示例#1
0
        private void UpdateBitboardState(BitboardState currentPiecePosition, BitboardState targetPosition)
        {
            var flippedBitsOfCurrentPosition = ~currentPiecePosition;

            BitboardState.BlackPieces &= flippedBitsOfCurrentPosition;
            BitboardState.BlackPieces ^= targetPosition;
        }
示例#2
0
        public override bool Equals(object bitboard)
        {
            BitboardState bitboard2 = (BitboardState)bitboard;

            if (bitboard2 == null)
            {
                return(false);
            }

            return
                ((this.StateRowA == bitboard2.StateRowA) &&
                 (this.StateRowB == bitboard2.StateRowB) &&
                 (this.StateRowC == bitboard2.StateRowC) &&
                 (this.StateRowD == bitboard2.StateRowD) &&
                 (this.StateRowE == bitboard2.StateRowE) &&
                 (this.StateRowF == bitboard2.StateRowF) &&
                 (this.StateRowG == bitboard2.StateRowG) &&
                 (this.StateRowH == bitboard2.StateRowH) &&
                 (this.StateRowI == bitboard2.StateRowI));
        }
示例#3
0
 public FullBitboardState(BitboardState whitePieces, BitboardState blackPieces)
 {
     WhitePieces = whitePieces;
     BlackPieces = blackPieces;
 }
示例#4
0
 private static bool IsPlayerTryingToMoveOntoOwnPiece(BitboardState playerPieces, BitboardState targetPosition)
 {
     return((playerPieces & targetPosition) != BitVersion.BitboardState.Empty);
 }