blob: 7e959103de7c233167661bf736b1c5dd55fb6045 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#ifndef SRC_MOVES_H_
#define SRC_MOVES_H_
#include "board.hpp"
#include <cstdint>
#include <vector>
struct Position {
uint8_t rank;
uint8_t file;
};
struct Move {
Position From;
Position To;
};
enum MoveResult {
SUCCES,
FRIENDLY_PIECE,
PIECE_IN_WAY,
};
MoveResult PlayMove(Move move, board *b); // TODO implement
std::vector<Move> GetLegalMoves(board *b);
Position IndexToPosition(int i);
void GenerateSlidingMoves(board *b, int from,
const std::array<int, 4> &directions,
std::vector<Move> &moves);
#endif /* SRC_MOVES_H_ */
|