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;
|
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)
|
char *piece_to_sym(piece_t p)
|
||||||
{
|
{
|
||||||
|
@@ -37,10 +37,11 @@ typedef struct __pos_s {
|
|||||||
* This allows a memcpy on this data (to save/restore position state).
|
* This allows a memcpy on this data (to save/restore position state).
|
||||||
*/
|
*/
|
||||||
struct_group_tagged(state_s, state,
|
struct_group_tagged(state_s, state,
|
||||||
square_t en_passant;
|
square_t en_passant;
|
||||||
castle_rights_t castle;
|
castle_rights_t castle;
|
||||||
u16 clock_50;
|
u16 clock_50;
|
||||||
u16 plycount; /* plies so far, start from 1 */
|
u16 plycount; /* plies so far, start from 1 */
|
||||||
|
piece_t captured; /* only for move_undo */
|
||||||
);
|
);
|
||||||
|
|
||||||
piece_t board[BOARDSIZE];
|
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,
|
static __always_inline int pos_between_count(const pos_t *pos,
|
||||||
const square_t sq1, const square_t sq2)
|
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