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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
#ifndef MOVES_H
#define MOVES_H
#include "ints.h"
#include "bitboard.h"
typedef u8 square_t;
typedef struct {
square_t from;
square_t to;
} move_t;
void position_make_move(position_t* position, move_t* move);
typedef struct {
move_t* moves;
u32 length;
u32 capacity;
} moves_t;
moves_t moves_init();
moves_t moves_init_wcapacity(u32 capacity);
moves_t moves_empty();
void add_move(moves_t* moves, square_t from, square_t to);
void get_pawn_moves(moves_t* moves, position_t position);
void get_knight_moves(moves_t* moves, position_t position);
void get_king_moves(moves_t* moves, position_t position);
void get_rook_moves(moves_t* moves, position_t position);
void get_bishop_moves(moves_t* moves, position_t position);
void get_queen_moves(moves_t* moves, position_t position);
void get_moves(moves_t* moves, position_t position);
void __forloop_rook_moves_gen(
moves_t* moves,
bitboard_t friendly_type,
bitboard_t friendly_pieces,
bitboard_t enemy_pieces
);
void __forloop_bishop_moves_gen(
moves_t* moves,
bitboard_t friendly_type,
bitboard_t friendly_pieces,
bitboard_t enemy_pieces
);
#endif // !MOVES_H
|