aboutsummaryrefslogtreecommitdiff
path: root/src/moves.hpp
blob: e48d7f8c6f6004f2524ca6af5596a99b844a86b0 (plain)
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 <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 GenerateKnightMoves(Game *b, int from, std::vector<Move> &moves,
                         bool GenerateQuietMoves);
void GeneratePawnMoves(Game *b, int from, std::vector<Move> &moves,
                       bool GenerateQuietMoves);
void GenerateCastlingMoves(int from, Game *g, std::vector<Move> &moves);
bool IsSquareAttacked(Game *g, Position square, bool byWhite);
GameState GetNewGameState(Game *g);

#endif /* SRC_MOVES_H_ */