diff options
| author | Adam <adammegarules1@gmail.com> | 2026-07-29 16:19:11 +0200 |
|---|---|---|
| committer | Adam <adammegarules1@gmail.com> | 2026-07-29 16:19:11 +0200 |
| commit | 9ce8ba4a63c1fbfa49af17ee7364b9165098a20f (patch) | |
| tree | b14a078839370f7e93d7e96e208a814c40a61e8e /src/moves.cpp | |
| parent | 1d6a6717ba088c3b89d50021f2bf6656eb564533 (diff) | |
dont alloce that much memory
Diffstat (limited to 'src/moves.cpp')
| -rw-r--r-- | src/moves.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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<Move> &moves) { std::vector<Move> GetPseudoLegalMoves(Game *b) { std::vector<Move> moves; - moves.reserve(50); // almost all position dont have that many moves - + moves.reserve(20); + constexpr std::array<int, 4> rook_Moves{-1, 1, 8, -8}; constexpr std::array<int, 4> bishop_Moves{-9, 9, -7, 7}; |
