add position blockers

This commit is contained in:
2024-03-12 10:44:25 +01:00
parent 08082faed3
commit cc3754ae00
4 changed files with 57 additions and 21 deletions

View File

@@ -133,7 +133,8 @@ static int fen_check(pos_t *pos)
if (!(error = pos_check(pos, 0))) {
/* TODO: Should it really be here ? */
pos->checkers = pos_checkers(pos, pos->turn);
pos->pinners = pos_pinners(pos, pos->turn);
pos->pinners = pos_king_pinners(pos, pos->turn);
pos->blockers = pos_king_blockers(pos, pos->turn, pos->pinners);
}
return error ? -1: warning;
}