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

@@ -217,7 +217,7 @@ void bb_print(const char *title, const bitboard_t bitboard)
//char c = p? p: 'X';
if (title)
printf("%s\n", title);
for (rank_t r = RANK_8; r >= RANK_1; --r) {
for (rank_t r = RANK_8 + 1; r --> RANK_1;) { /* "downto"" op." */
printf("%d ", r + 1);
for (file_t f = FILE_A; f <= FILE_H; ++f) {
printf(" %c", bitboard & bb_sq[sq_make(f, r)] ? 'X': '.');
@@ -252,7 +252,7 @@ void bb_print_multi(const char *title, int n, ...)
if (title)
printf("%s\n", title);
for (rank_t r = RANK_8; r >= RANK_1; --r) {
for (rank_t r = RANK_8 + 1; r --> RANK_1;) {
for (int i = 0; i < n; ++i) {
printf("%d ", r + 1);
for (file_t f = FILE_A; f <= FILE_H; ++f) {