show whose turn it is in single mode game default tip

Sat, 28 Mar 2026 14:04:21 +0100

author
Mike Becker <universe@uap-core.de>
date
Sat, 28 Mar 2026 14:04:21 +0100
changeset 91
c7b586c0ee36
parent 90
395542d915d7

show whose turn it is in single mode game

src/game.c file | annotate | diff | comparison | revisions
--- a/src/game.c	Sat Mar 28 14:01:14 2026 +0100
+++ b/src/game.c	Sat Mar 28 14:04:21 2026 +0100
@@ -214,22 +214,21 @@
     
     flushinp();
     while (1) {
+        const char *curcolorstr = curcolor == WHITE ? "White" : "Black";
         if (timecontrol(gamestate, gameinfo)) {
             return 1;
         }
-        
         move(inputy, 0);
         printw(
             "Use chess notation to enter your move.\n"
             "Or use a command: remis, resign, savepgn\n\n"
-            "Type your move: ");
+            "%s to move: ", curcolorstr);
         clrtoeol();
         
         if (asyncgetnstr(movestr, &bufpos, MOVESTR_BUFLEN)) {
             if (strncmp(movestr, "resign", MOVESTR_BUFLEN) == 0) {
                 gamestate->resign = 1;
-                printw("%s resigned!",
-                    curcolor==WHITE?"White":"Black");
+                printw("%s resigned!", curcolorstr);
                 clrtobot();
                 refresh();
                 return 1;

mercurial