From 0528ed43bb13edd89dfa8a38b9bfca6ba7fd83d6 Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 30 Jul 2026 17:19:56 +0200 Subject: optimazing --- src/moves.hpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src/moves.hpp') diff --git a/src/moves.hpp b/src/moves.hpp index 32143f7..282cff8 100644 --- a/src/moves.hpp +++ b/src/moves.hpp @@ -4,15 +4,18 @@ #include "board/board.hpp" #include -std::vector GetLegalMoves(Game *g); -std::vector GetPseudoLegalMoves(Game *g); +std::vector GetLegalMoves(Game *g, bool GenerateQuietMoves = true); +std::vector GetPseudoLegalMoves(Game *g, bool GenerateQuietMoves); Position IndexToPosition(int i); void GenerateSlidingMoves(Game *g, int from, const std::array &directions, - std::vector &moves); -void GenerateKingMoves(Game *g, int from, std::vector &moves); -void GenerateKnightMoves(Game *g, int from, std::vector &moves); -void GeneratePawnMoves(Game *g, int from, std::vector &moves); + std::vector &moves, bool GenerateQuietMoves); +void GenerateKingMoves(Game *g, int from, std::vector &moves, + bool GenerateQuietMoves); +void GenerateKnightMoves(Game *b, int from, std::vector &moves, + bool GenerateQuietMoves); +void GeneratePawnMoves(Game *b, int from, std::vector &moves, + bool GenerateQuietMoves); bool IsSquareAttacked(Game *g, Position square, bool byWhite); GameState GetNewGameState(Game *g); -- cgit v1.2.3