add pos_del function
This commit is contained in:
@@ -163,6 +163,18 @@ pos_t *pos_clear(pos_t *pos)
|
|||||||
return pos;
|
return pos;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* pos_del() - delete a position.
|
||||||
|
* @pos: &position.
|
||||||
|
*/
|
||||||
|
void pos_del(pos_t *pos)
|
||||||
|
{
|
||||||
|
pieces_del(pos, WHITE);
|
||||||
|
pieces_del(pos, BLACK);
|
||||||
|
moves_del(pos);
|
||||||
|
pool_add(pos_pool, pos);
|
||||||
|
}
|
||||||
|
|
||||||
pos_t *pos_startpos(pos_t *pos)
|
pos_t *pos_startpos(pos_t *pos)
|
||||||
{
|
{
|
||||||
static char *startfen="rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1";
|
static char *startfen="rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1";
|
||||||
|
@@ -45,6 +45,7 @@ void bitboard_print2(bitboard_t bb1, bitboard_t bb2);
|
|||||||
void pos_pieces_print(pos_t *pos);
|
void pos_pieces_print(pos_t *pos);
|
||||||
void pos_print(pos_t *pos);
|
void pos_print(pos_t *pos);
|
||||||
pos_t *pos_clear(pos_t *pos);
|
pos_t *pos_clear(pos_t *pos);
|
||||||
|
void pos_del(pos_t *pos);
|
||||||
pos_t *pos_startpos(pos_t *pos);
|
pos_t *pos_startpos(pos_t *pos);
|
||||||
pos_t *pos_create();
|
pos_t *pos_create();
|
||||||
pool_t *pos_pool_init();
|
pool_t *pos_pool_init();
|
||||||
|
Reference in New Issue
Block a user