#ifndef SRC_MOVES_H_ #define SRC_MOVES_H_ #include "board/board.hpp" #include #include enum move_generate_options : std::uint8_t { ALL, CAPTUARES_ONLY, NON_CAPTUARES_ONLY, }; void initMagicBitboards(); std::vector GetLegalMoves(Game *g, const move_generate_options &options); std::vector GetPseudoLegalMoves(const Game &g, const move_generate_options &options); constexpr Position IndexToPosition(int i) { auto rank = static_cast(i / 8); auto file = static_cast(i % 8); return {.rank = rank, .file = file}; } bool IsSquareAttacked(const Game &g, Position square, bool byColor); GameState GetboardState(Game *g, const std::vector &moves); #endif /* SRC_MOVES_H_ */