aboutsummaryrefslogtreecommitdiff
path: root/src/moves.hpp
blob: 57d14670bb1f7f70fbb1b24d38e7a0ec85658fdb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#ifndef SRC_MOVES_H_
#define SRC_MOVES_H_

#include "board/board.hpp"
#include <vector>

std::vector<Move> GetLegalMoves(Game *g, bool GenerateQuietMoves = true);
std::vector<Move> GetPseudoLegalMoves(Game *g, bool GenerateQuietMoves);
Position IndexToPosition(int i);
void GenerateSlidingMoves(Game *g, int from,
                          const std::array<int, 4> &directions,
                          std::vector<Move> &moves, bool GenerateQuietMoves);
void GenerateKingMoves(Game *g, int from, std::vector<Move> &moves,
                       bool GenerateQuietMoves);
void GeneratePawnMoves(Game *b, int from, std::vector<Move> &moves,
                       bool GenerateQuietMoves);
bool IsSquareAttacked(Game *g, Position square, bool byColor);
void GenerateCastlingMoves(int from, Game *g, std::vector<Move> &moves);
GameState GetNewGameState(Game *g);

#endif /* SRC_MOVES_H_ */