change keyboard settings
authorLaurent Mazet <mazet@softndesign.org>
Thu, 19 Sep 2024 06:12:19 +0000 (08:12 +0200)
committerLaurent Mazet <mazet@softndesign.org>
Thu, 19 Sep 2024 06:12:19 +0000 (08:12 +0200)
reversi.c

index fdbe5b8c3a500d3f86c804832527fa3fd472543d..a41a5799fc1096a50ecb947db69b46f42cc797ee 100644 (file)
--- a/reversi.c
+++ b/reversi.c
@@ -30,6 +30,7 @@ char *help =
     "<o> Hold/Release piece\n"
     "<q> Quit\n"
     "<s> Save file\n"
+    "<u> Change player\n"
     ;
 
 int usage (int ret)
@@ -208,7 +209,7 @@ int main (int argc, char *argv[])
         case KEY_BACKSPACE:
         case KEY_DELETE:
         case 127:
-        case ' ':
+        case 'u':
             id = (id == 0) ? 1 : 0;
             break;
         case KEY_UP:
@@ -237,6 +238,7 @@ int main (int argc, char *argv[])
             break;
         case '\n':
         case '\r':
+        case ' ':
         case 'o':
             if (putdisk (board, xcursor, ycursor, id)) {
                 id = (id == 0) ? 1 : 0;