src/game.c

changeset 116
4bf18d42e7ee
parent 115
206201d544be
--- a/src/game.c	Tue Apr 28 12:25:48 2026 +0200
+++ b/src/game.c	Tue Apr 28 12:33:22 2026 +0200
@@ -342,6 +342,7 @@
 
         /* read move */
         if (use_premove || asyncgetnstr(movestr, &bufpos, MOVESTR_BUFLEN)) {
+            bool was_premove = use_premove;
             use_premove = false;
             if (strncmp(movestr, "resign", MOVESTR_BUFLEN) == 0) {
                 gamestate->resign = 1;
@@ -420,7 +421,11 @@
                     }
                     break;
                 default:
-                    eval_move_failed_msg(eval_result);
+                    if (was_premove) {
+                        printw("\nThe prepared move could not be executed.");
+                    } else {
+                        eval_move_failed_msg(eval_result);
+                    }
                 }
                 clrtoeol();
             }

mercurial