From 9ce8ba4a63c1fbfa49af17ee7364b9165098a20f Mon Sep 17 00:00:00 2001 From: Adam Date: Wed, 29 Jul 2026 16:19:11 +0200 Subject: dont alloce that much memory --- src/moves.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/moves.cpp') diff --git a/src/moves.cpp b/src/moves.cpp index 008020d..8a7feb5 100644 --- a/src/moves.cpp +++ b/src/moves.cpp @@ -103,8 +103,8 @@ void GeneratePawnMoves(Game *b, int from, std::vector &moves) { std::vector GetPseudoLegalMoves(Game *b) { std::vector moves; - moves.reserve(50); // almost all position dont have that many moves - + moves.reserve(20); + constexpr std::array rook_Moves{-1, 1, 8, -8}; constexpr std::array bishop_Moves{-9, 9, -7, 7}; -- cgit v1.2.3