simplify 0x88 macros / remove redundant chessdefs.h equivalent ones

This commit is contained in:
2021-11-20 16:15:45 +01:00
parent 6b2c1702f6
commit 05a64ec742
6 changed files with 61 additions and 61 deletions

View File

@@ -88,7 +88,7 @@ pos_t *fen2pos(pos_t *pos, char *fen)
SET_COLOR(piece, color);
board[SQ88(file, rank)].piece = piece;
board[SQ88(file, rank)].s_piece =
piece_add(pos, piece, SQUARE(file, rank));
piece_add(pos, piece, SQ88(file, rank));
file++;
break;
case '/':
@@ -146,8 +146,10 @@ pos_t *fen2pos(pos_t *pos, char *fen)
SKIP_BLANK(p);
pos->en_passant = 0;
if (*p != '-') {
SET_F(pos->en_passant, C2FILE(*p++));
SET_R(pos->en_passant, C2RANK(*p++));
//SET_F(pos->en_passant, C2FILE(*p++));
//SET_R(pos->en_passant, C2RANK(*p++));
pos->en_passant = SQ88(C2FILE(*p), C2RANK(*(p+1)));
pos += 2;
} else {
p++;
}