diff options
| author | Aargh Rai <aargh.rai+git@gmail.com> | 2026-07-16 14:08:24 +0530 |
|---|---|---|
| committer | Aargh Rai <aargh.rai+git@gmail.com> | 2026-07-16 14:08:24 +0530 |
| commit | 1a52152852ff29c727673fc80e8bf8eca5ed6365 (patch) | |
| tree | e719771aa1b23f0b8774814ee907057f86f1dda1 /include/engine/moves.h | |
| parent | 6ac448727e1e26c78055eaaa361217f64393d808 (diff) | |
starting pos, move count, test pass
Diffstat (limited to 'include/engine/moves.h')
| -rw-r--r-- | include/engine/moves.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/include/engine/moves.h b/include/engine/moves.h index 4032557..755a77a 100644 --- a/include/engine/moves.h +++ b/include/engine/moves.h @@ -28,7 +28,7 @@ typedef struct { square_t to; u16 flags; } move_t; -void position_make_move(position_t *position, move_t *move); +void position_make_move(position_t *position, move_t move); typedef struct { move_t *moves; @@ -36,8 +36,9 @@ typedef struct { u32 capacity; } moves_t; -moves_t moves_init(); -moves_t moves_init_wcapacity(u32 capacity); +void moves_init(moves_t *moves); +void moves_deinit(moves_t moves); +void moves_init_wcapacity(moves_t *moves, u32 capacity); moves_t moves_empty(); struct add_move_params { @@ -65,6 +66,9 @@ void get_queen_moves(moves_t *moves, position_t position); void get_moves(moves_t *moves, position_t position); +bool square_attacked(position_t position, square_t square, u8 by_color); +void get_legal_moves(moves_t *moves, position_t position); + #ifdef MOVES_INTERNAL void __forloop_rook_moves_gen( moves_t *moves, |
