From 4eb36e67eca586a662298bfe8cc5392fbfa698e0 Mon Sep 17 00:00:00 2001 From: Adam Date: Sat, 15 Aug 2026 17:01:54 +0200 Subject: implementing memory optimazied move using uint16_t instead of a four integers and one byte --- src/moves.hpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/moves.hpp') diff --git a/src/moves.hpp b/src/moves.hpp index 57d1467..54ab730 100644 --- a/src/moves.hpp +++ b/src/moves.hpp @@ -2,20 +2,22 @@ #define SRC_MOVES_H_ #include "board/board.hpp" +#include #include -std::vector GetLegalMoves(Game *g, bool GenerateQuietMoves = true); -std::vector GetPseudoLegalMoves(Game *g, bool GenerateQuietMoves); +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, bool GenerateQuietMoves); -void GenerateKingMoves(Game *g, int from, std::vector &moves, + std::vector &moves, + bool GenerateQuietMoves); +void GenerateKingMoves(Game *g, int from, std::vector &moves, bool GenerateQuietMoves); -void GeneratePawnMoves(Game *b, int from, std::vector &moves, +void GeneratePawnMoves(Game *b, uint8_t from, std::vector &moves, bool GenerateQuietMoves); bool IsSquareAttacked(Game *g, Position square, bool byColor); -void GenerateCastlingMoves(int from, Game *g, std::vector &moves); +void GenerateCastlingMoves(int from, Game *g, std::vector &moves); GameState GetNewGameState(Game *g); #endif /* SRC_MOVES_H_ */ -- cgit v1.2.3