made some optimizations in PopBit and other parts
This commit is contained in:
1 parent
119a87f227
commit
986b49b503
8 files changed
+32
-37
No files matched your search
+6
-6
@@ -18,7 +18,7 @@ static Bitboard notHGfile = notHfile & ~files[G];
|
||||
|
||||
Bitboard maskPawnAttacks(int side, int square) {
|
||||
Bitboard attacks;
|
||||
Bitboard attacker = Bitboard::GetSquare(square);
|
||||
Bitboard attacker = (1ULL << square);
|
||||
|
||||
// White
|
||||
if (!side) {
|
||||
@@ -35,7 +35,7 @@ Bitboard maskPawnAttacks(int side, int square) {
|
||||
|
||||
Bitboard maskKnightAttacks(int square) {
|
||||
Bitboard attacks;
|
||||
Bitboard attacker = Bitboard::GetSquare(square);
|
||||
Bitboard attacker = (1ULL << square);
|
||||
|
||||
if (((attacker << noEa + north) & notAfile).GetBoard()) attacks |= (attacker << noEa + north);
|
||||
if (((attacker << noWe + north) & notHfile).GetBoard()) attacks |= (attacker << noWe + north);
|
||||
@@ -52,7 +52,7 @@ Bitboard maskKnightAttacks(int square) {
|
||||
|
||||
Bitboard maskKingAttacks(int square) {
|
||||
Bitboard attacks;
|
||||
Bitboard attacker = Bitboard::GetSquare(square);
|
||||
Bitboard attacker = (1ULL << square);
|
||||
|
||||
attacks |= (attacker << north);
|
||||
attacks |= (attacker << south);
|
||||
@@ -369,12 +369,12 @@ static void GenKingMoves(Board &board, bool color) {
|
||||
|
||||
void GenerateMoves(Board &board) {
|
||||
bool side = board.sideToMove;
|
||||
board.moveList.clear();
|
||||
board.ResetMoves();
|
||||
|
||||
GenPawnMoves(board, side);
|
||||
GenKnightMoves(board, side);
|
||||
GenKnightMoves(board, side);
|
||||
GenKingMoves(board, side);
|
||||
GenBishopMoves(board, side);
|
||||
GenRookMoves(board, side);
|
||||
GenQueenMoves(board, side);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user