diff options
| author | Aargh Rai <aargh.rai+git@gmail.com> | 2026-07-20 21:14:44 +0530 |
|---|---|---|
| committer | Aargh Rai <aargh.rai+git@gmail.com> | 2026-07-20 21:14:44 +0530 |
| commit | 1ebaab7b771c4c73be66895515f948ffe2394cc0 (patch) | |
| tree | 47ae3d951056cc9a3e3b4aa76f0b15fd631a16b0 /src/engine/moves.c | |
| parent | a0970bddbd9f6b97b6a12ba7f73fd1810a2e1e1b (diff) | |
simple ttable tests
Diffstat (limited to 'src/engine/moves.c')
| -rw-r--r-- | src/engine/moves.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/src/engine/moves.c b/src/engine/moves.c index 6f96109..8df9364 100644 --- a/src/engine/moves.c +++ b/src/engine/moves.c @@ -63,22 +63,6 @@ void get_legal_moves(moves_t* moves, position_t position) { moves->length = write; } -int find_piece_on_square(position_t* p, int square) { - if ((p->bitboards[WHITE_KING] >> square) & 1) return WHITE_KING; - if ((p->bitboards[WHITE_QUEEN] >> square) & 1) return WHITE_QUEEN; - if ((p->bitboards[WHITE_ROOK] >> square) & 1) return WHITE_ROOK; - if ((p->bitboards[WHITE_BISHOP] >> square) & 1) return WHITE_BISHOP; - if ((p->bitboards[WHITE_KNIGHT] >> square) & 1) return WHITE_KNIGHT; - if ((p->bitboards[WHITE_PAWN] >> square) & 1) return WHITE_PAWN; - if ((p->bitboards[BLACK_KING] >> square) & 1) return BLACK_KING; - if ((p->bitboards[BLACK_QUEEN] >> square) & 1) return BLACK_QUEEN; - if ((p->bitboards[BLACK_ROOK] >> square) & 1) return BLACK_ROOK; - if ((p->bitboards[BLACK_BISHOP] >> square) & 1) return BLACK_BISHOP; - if ((p->bitboards[BLACK_KNIGHT] >> square) & 1) return BLACK_KNIGHT; - if ((p->bitboards[BLACK_PAWN] >> square) & 1) return BLACK_PAWN; - assert(0 && "Failed to find the piece on the square"); -} - void position_make_move(position_t* position, move_t move) { position->passantable_file = 0; |
