private void UpdateBitboardState(BitboardState currentPiecePosition, BitboardState targetPosition) { var flippedBitsOfCurrentPosition = ~currentPiecePosition; BitboardState.BlackPieces &= flippedBitsOfCurrentPosition; BitboardState.BlackPieces ^= targetPosition; }
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)); }
public FullBitboardState(BitboardState whitePieces, BitboardState blackPieces) { WhitePieces = whitePieces; BlackPieces = blackPieces; }
private static bool IsPlayerTryingToMoveOntoOwnPiece(BitboardState playerPieces, BitboardState targetPosition) { return((playerPieces & targetPosition) != BitVersion.BitboardState.Empty); }