add movegen draft, add king square in pos_t, BRQKN move gen (untested)

This commit is contained in:
2024-02-20 21:00:45 +01:00
parent 403e625cbe
commit 568b39e366
11 changed files with 231 additions and 53 deletions

View File

@@ -20,6 +20,7 @@
#include "piece.h"
#include "board.h"
#include "bitboard.h"
#include "position.h"
/* vectors are clockwise from N */
static int knight_vector[] = {
@@ -110,6 +111,15 @@ void bitboard_init(void)
}
}
bitboard_t bb_knight_moves(bitboard_t notmine, square_t sq)
{
return bb_knight[sq] & notmine;
}
bitboard_t bb_king_moves(bitboard_t notmine, square_t sq)
{
return bb_king[sq] & notmine;
}
/**
* bitboard_print() - print simple bitboard representation
* @title: a string or NULL