summaryrefslogtreecommitdiff
path: root/src/search.h
diff options
context:
space:
mode:
authorAargh Rai <aargh.rai+git@gmail.com>2026-02-20 17:04:46 +0530
committerAargh Rai <aargh.rai+git@gmail.com>2026-02-20 17:04:46 +0530
commit9cd36deffadc4f5ab83f08c2999407b31354027e (patch)
treee298606fb938ac6aea26c408c3cd29ddf4b17f9c /src/search.h
parentfd57b964e50a4cb3385976a473bc287d682bcbdb (diff)
some moves dynamic array setup & starting position
Diffstat (limited to 'src/search.h')
-rw-r--r--src/search.h24
1 files changed, 24 insertions, 0 deletions
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