diff options
| author | Aargh Rai <aargh.rai+git@gmail.com> | 2026-06-02 17:39:09 +0530 |
|---|---|---|
| committer | Aargh Rai <aargh.rai+git@gmail.com> | 2026-06-02 17:39:09 +0530 |
| commit | 058f12c699c9183f93f280ad7eb54c8a1b25f523 (patch) | |
| tree | f06f21c94666243b80a5823c3932349dba4ed3cc /src/engine/moves/vec.c | |
| parent | df577a30f2df1d60a0254403147fd2077a7c8b42 (diff) | |
added move flags
will try stockfish later dw
Diffstat (limited to 'src/engine/moves/vec.c')
| -rw-r--r-- | src/engine/moves/vec.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/engine/moves/vec.c b/src/engine/moves/vec.c index 6192706..6a5f3c6 100644 --- a/src/engine/moves/vec.c +++ b/src/engine/moves/vec.c @@ -2,10 +2,6 @@ #include <assert.h> #include <stdlib.h> -void position_make_move(position_t* position, move_t* move) { - -} - moves_t moves_init() { return moves_init_wcapacity(16); } @@ -32,7 +28,12 @@ int min(int a, int b) { return a; } -void add_move(moves_t* moves, square_t from, square_t to) { +void _add_move( + moves_t* moves, + square_t from, + square_t to, + struct add_move_params params +) { assert(moves->moves != 0); assert(from != to); @@ -43,9 +44,9 @@ void add_move(moves_t* moves, square_t from, square_t to) { moves->capacity * sizeof(*moves->moves) ); } - moves->moves[moves->length] = (move_t){ + moves->moves[moves->length++] = (move_t) { .from = from, - .to = to + .to = to, + .flags = params.flags, }; - moves->length++; } |
