summaryrefslogtreecommitdiff
path: root/src/engine
diff options
context:
space:
mode:
authorAargh Rai <aargh.rai+git@gmail.com>2026-05-28 00:09:50 +0530
committerAargh Rai <aargh.rai+git@gmail.com>2026-05-28 00:09:50 +0530
commitc56cc12c154b3f21411d71e10f4e8a5a9682355b (patch)
tree9e07f9cf746ca12ca386c3ea1bebe4953453045a /src/engine
parent2c2a70b69869f149c0407a62f1bf4c39899027a7 (diff)
the moves now make it to the frontend
i know the issue which exists, where the server can't handle the request if i reload the page
Diffstat (limited to 'src/engine')
-rw-r--r--src/engine/moves.c9
-rw-r--r--src/engine/moves.h2
-rw-r--r--src/engine/moves/king.c1
3 files changed, 11 insertions, 1 deletions
diff --git a/src/engine/moves.c b/src/engine/moves.c
index 662aa54..ac9fbba 100644
--- a/src/engine/moves.c
+++ b/src/engine/moves.c
@@ -5,3 +5,12 @@
#include "moves/rook.c"
#include "moves/bishop.c"
#include "moves/queen.c"
+
+void get_moves(moves_t* moves, position_t position) {
+ get_pawn_moves(moves, position);
+ get_knight_moves(moves, position);
+ get_king_moves(moves, position);
+ get_rook_moves(moves, position);
+ get_bishop_moves(moves, position);
+ get_queen_moves(moves, position);
+}
diff --git a/src/engine/moves.h b/src/engine/moves.h
index 8081ffe..b63b9e2 100644
--- a/src/engine/moves.h
+++ b/src/engine/moves.h
@@ -30,6 +30,8 @@ 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,
diff --git a/src/engine/moves/king.c b/src/engine/moves/king.c
index 0637109..6e8d105 100644
--- a/src/engine/moves/king.c
+++ b/src/engine/moves/king.c
@@ -28,7 +28,6 @@ void get_king_moves(moves_t* moves, position_t position) {
}
movement &= ~friendly_pieces;
- print_bitboard(movement);
while (movement) {
int to = __builtin_ctzll(movement);
movement &= movement - 1;