From 9cd36deffadc4f5ab83f08c2999407b31354027e Mon Sep 17 00:00:00 2001 From: Aargh Rai Date: Fri, 20 Feb 2026 17:04:46 +0530 Subject: some moves dynamic array setup & starting position --- src/search.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/search.h (limited to 'src/search.h') diff --git a/src/search.h b/src/search.h new file mode 100644 index 0000000..153b865 --- /dev/null +++ b/src/search.h @@ -0,0 +1,24 @@ +#ifndef SEARCH_H +#define SEARCH_H + +#include "ints.h" + +typedef u8 square_t; + +typedef struct { + square_t from; + square_t to; +} move_t; + +typedef struct { + move_t* moves; + u32 length; + u32 capacity; +} moves_t; + +moves_t init_moves(); +moves_t init_moves_wcapacity(u32 capacity); +moves_t empty_moves(); +void add_move(moves_t* moves, square_t from, square_t to); + +#endif // !SEARCH_H -- cgit v1.2.3