position: add captured piece
This commit is contained in:
@@ -65,10 +65,6 @@ char *piece_to_low(piece_t p)
|
||||
{
|
||||
return piece_details[p].low;
|
||||
}
|
||||
//char *piece_to_sym(piece_t p)
|
||||
//{
|
||||
// return piece_details[PIECE(p)].sym;
|
||||
//}
|
||||
|
||||
char *piece_to_sym(piece_t p)
|
||||
{
|
||||
|
@@ -41,6 +41,7 @@ typedef struct __pos_s {
|
||||
castle_rights_t castle;
|
||||
u16 clock_50;
|
||||
u16 plycount; /* plies so far, start from 1 */
|
||||
piece_t captured; /* only for move_undo */
|
||||
);
|
||||
|
||||
piece_t board[BOARDSIZE];
|
||||
@@ -130,7 +131,7 @@ static __always_inline bitboard_t pos_between_occ(const pos_t *pos,
|
||||
static __always_inline int pos_between_count(const pos_t *pos,
|
||||
const square_t sq1, const square_t sq2)
|
||||
{
|
||||
return bb_between_excl[sq1][sq2] & pos_occ(pos);
|
||||
return popcount64(pos_between_occ(pos, sq1, sq2));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user