diff options
| author | Adam <adammegarules1@gmail.com> | 2026-08-11 10:59:00 +0200 |
|---|---|---|
| committer | Adam <adammegarules1@gmail.com> | 2026-08-11 10:59:00 +0200 |
| commit | e10aa25f4246c1d570767404ddb2e5fe826c3050 (patch) | |
| tree | 35d7669ce7b045ca440295e5f26663f89a72c91e /src/moves.cpp | |
| parent | e9e7e1ebd00574b7ce36e8bff9c77f8ce57b0bb3 (diff) | |
removing useless checks
Diffstat (limited to 'src/moves.cpp')
| -rw-r--r-- | src/moves.cpp | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/src/moves.cpp b/src/moves.cpp index 52c8d2f..3cdeafa 100644 --- a/src/moves.cpp +++ b/src/moves.cpp @@ -47,17 +47,6 @@ static void GenerateKnightMoves(Game *b, std::vector<Move> &moves, int next = __builtin_ctzll(knight_attacks); knight_attacks &= knight_attacks - 1; - // maybe remove this line of code - if (next >= 64 || next < 0) { - continue; - } - - // maybe also remove this line of code - const int fileDelta = std::abs((next % 8) - (from % 8)); - if (fileDelta != 1 && fileDelta != 2) { - continue; - }; - bool hasFriendlyPiece = b->turn ? (b->WhitePieceBitboard & (1ULL << next)) > 0 : (b->BlackPieceBitboard & (1ULL << next)) > 0; |
