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

@@ -292,7 +292,7 @@ char *pos2fen(const pos_t *pos, char *fen)
/* 1) position
*/
for (rank_t r = RANK_8; r >= RANK_1; --r) {
for (rank_t r = RANK_8 + 1; r --> RANK_1;) {
for (file_t f = FILE_A; f <= FILE_H;) {
square_t sq = sq_make(f, r);
piece_t piece = pos->board[sq];