1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#ifndef SRC_MOVES_H_
#define SRC_MOVES_H_
#include "board/board.hpp"
#include <cstdint>
#include <vector>
std::vector<uint16_t> GetLegalMoves(Game *g, bool GenerateQuietMoves = true);
std::vector<uint16_t> GetPseudoLegalMoves(Game *g, bool GenerateQuietMoves);
Position IndexToPosition(int i);
void GenerateSlidingMoves(Game *g, int from,
const std::array<int, 4> &directions,
std::vector<uint16_t> &moves,
bool GenerateQuietMoves);
void GenerateKingMoves(Game *g, int from, std::vector<uint16_t> &moves,
bool GenerateQuietMoves);
void GeneratePawnMoves(const Game &g, uint8_t from,
std::vector<uint16_t> &moves, bool GenerateQuietMoves);
bool IsSquareAttacked(Game *g, Position square, bool byColor);
void GenerateCastlingMoves(int from, Game *g, std::vector<uint16_t> &moves);
GameState GetNewGameState(Game *g);
#endif /* SRC_MOVES_H_ */
|