From e10aa25f4246c1d570767404ddb2e5fe826c3050 Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 11 Aug 2026 10:59:00 +0200 Subject: removing useless checks --- src/moves.cpp | 11 ----------- 1 file changed, 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 &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; -- cgit v1.2.3