summaryrefslogtreecommitdiff
path: root/src/engine/moves.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine/moves.c')
-rw-r--r--src/engine/moves.c16
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;