convert piece_t, square_t etc. to u8 (no more typed enum. See C23 ?).

This commit is contained in:
2024-07-03 08:49:54 +02:00
parent 902c224aa9
commit 91abc3e26d
9 changed files with 58 additions and 30 deletions

View File

@@ -56,8 +56,8 @@ static __always_inline rank_t sq_rank(square_t square)
return square >> 3;
}
#define sq_ok(sq) ((sq) >= A1 && (sq) <= H8)
#define sq_coord_ok(c) ((c) >= 0 && (c) < 8)
#define sq_ok(sq) ((sq) <= H8)
#define sq_coord_ok(c) ((c) < 8)
/**
* sq_dist() - Chebyshev (king) distance between two squares (macro).