src/game.c

changeset 68
b34de5ce7d0e
parent 63
611332453da0
child 69
c8f2c280cff7
--- a/src/game.c	Wed Aug 29 17:05:40 2018 +0200
+++ b/src/game.c	Wed Aug 29 17:31:36 2018 +0200
@@ -235,8 +235,7 @@
             } else {
                 Move move;
                 int result = eval_move(gamestate, movestr, &move, curcolor);
-                switch (result) {
-                case VALID_MOVE_SYNTAX:
+                if (result == VALID_MOVE_SYNTAX) {
                     result = validate_move(gamestate, &move);
                     if (result == VALID_MOVE_SEMANTICS) {
                         apply_move(gamestate, &move);
@@ -254,8 +253,7 @@
                     } else {
                         eval_move_failed_msg(result);
                     }
-                    break;
-                default:
+                } else {
                     eval_move_failed_msg(result);
                 }
                 clrtoeol();

mercurial