blob: 592da3f3fc74a05ed2fa251f763df7183f182b75 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#ifndef SRC_MOVES_H_
#define SRC_MOVES_H_
#include "board.hpp"
#include <vector>
std::vector<Move> GetLegalMoves(Game *b);
std::vector<Move> GetPseudoLegalMoves(Game *b);
Position IndexToPosition(int i);
void GenerateSlidingMoves(Game *b, int from,
const std::array<int, 4> &directions,
std::vector<Move> &moves);
void GenerateKingMoves(Game *b, int from, std::vector<Move> &moves);
void GenerateKningtMoves(Game *b, int from, std::vector<Move> &moves);
void GeneratePawnMoves(Game *b, int from, std::vector<Move> &moves);
bool IsSquareAttacked(Game *board, Position square, bool white);
bool IsPieceTypeAttacked(Game *board, PieceType type, bool white);
#endif /* SRC_MOVES_H_ */
|