reimplemented the GetSquare function + enabled compiler optimization
This commit is contained in:
1 parent
986b49b503
commit
f6c2b6a881
4 files changed
+12
-8
No files matched your search
+3
-3
@@ -18,7 +18,7 @@ static Bitboard notHGfile = notHfile & ~files[G];
|
||||
|
||||
Bitboard maskPawnAttacks(int side, int square) {
|
||||
Bitboard attacks;
|
||||
Bitboard attacker = (1ULL << square);
|
||||
Bitboard attacker = Bitboard::GetSquare(square);
|
||||
|
||||
// White
|
||||
if (!side) {
|
||||
@@ -35,7 +35,7 @@ Bitboard maskPawnAttacks(int side, int square) {
|
||||
|
||||
Bitboard maskKnightAttacks(int square) {
|
||||
Bitboard attacks;
|
||||
Bitboard attacker = (1ULL << square);
|
||||
Bitboard attacker = Bitboard::GetSquare(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 = (1ULL << square);
|
||||
Bitboard attacker = Bitboard::GetSquare(square);
|
||||
|
||||
attacks |= (attacker << north);
|
||||
attacks |= (attacker << south);
|
||||
|
||||
Reference in new issue
Block a user