#ifndef CHESS_ENGINE_MOVEGENERATOR_HPP #define CHESS_ENGINE_MOVEGENERATOR_HPP #include "Piece.hpp" #include "Square.hpp" #include "Move.hpp" #include "CastlingRights.hpp" #include "BitBoard.hpp" #include #include #include #include class MoveGenerator { public: using MoveVec = std::vector; MoveGenerator(const std::shared_ptr& pieceBB, const std::shared_ptr& occupiedBB); MoveGenerator(MoveGenerator &) = delete; MoveGenerator &operator=(MoveGenerator const &) = delete; void generatePawnMoves(const Square &from, const std::optional &eps, PieceColor color, MoveVec &moves) const; void generatePawnMoves(const Square &from, PieceColor color, MoveVec &moves); private: const std::shared_ptr mPieceBBs; const std::shared_ptr mOccupiedBB; void generatePawnMoves(const Square &from, BitBoard targets, PieceColor color, MoveVec &moves) const; static void generateMoves(const Square &from, BitBoard movesBB, MoveVec &moves); static void generateMovesWithPromotion(const Square &from, BitBoard movesBB, MoveVec &moves); }; #endif //CHESS_ENGINE_MOVEGENERATOR_HPP