src/chess/rules.c

changeset 87
d4d67105d4e1
parent 80
b980a7192b5a
--- a/src/chess/rules.c	Sun Nov 30 22:42:46 2025 +0100
+++ b/src/chess/rules.c	Fri Mar 27 18:11:42 2026 +0100
@@ -184,7 +184,7 @@
     }
 }
 
-unsigned char* getpieceunicode(uint8_t piece) {
+char* getpieceunicode(uint8_t piece) {
     switch (piece & PIECE_MASK) {
     case PAWN: return "\u265f";
     case ROOK: return "\u265c";
@@ -537,11 +537,11 @@
         
         bool result = false;
         uint8_t kingfile = 0, kingrow = 0;
-        for (uint8_t row = 0 ; row < 8 ; row++) {
-            for (uint8_t file = 0 ; file < 8 ; file++) {
-                if (gamestate->board[row][file] == (color|KING)) {
-                    kingfile = file;
-                    kingrow = row;
+        for (uint8_t r = 0 ; r < 8 ; r++) {
+            for (uint8_t f = 0 ; f < 8 ; f++) {
+                if (gamestate->board[r][f] == (color|KING)) {
+                    kingfile = f;
+                    kingrow = r;
                 }
             }
         }

mercurial