surrender is now resign

Thu, 17 Apr 2014 11:41:02 +0200

author
Mike Becker <universe@uap-core.de>
date
Thu, 17 Apr 2014 11:41:02 +0200
changeset 44
1891d88cbd10
parent 43
12141136a0da
child 45
e14a1d9aa91d

surrender is now resign

src/game.c file | annotate | diff | comparison | revisions
src/network.h file | annotate | diff | comparison | revisions
--- a/src/game.c	Wed Apr 16 22:20:59 2014 +0200
+++ b/src/game.c	Thu Apr 17 11:41:02 2014 +0200
@@ -188,13 +188,13 @@
         move(inputy, 0);
         printw(
             "Use chess notation to enter your move.\n"
-            "Or type 'surr' to surrender or 'remis' to end with remis.\n\n"
+            "Or type 'resign' to resign or 'remis' to end with remis.\n\n"
             "Type your move: ");
         clrtoeol();
         
         if (asyncgetnstr(movestr, &bufpos, MOVESTR_BUFLEN)) {
-            if (strncmp(movestr, "surr", MOVESTR_BUFLEN) == 0) {
-                printw("%s surrendered!",
+            if (strncmp(movestr, "resign", MOVESTR_BUFLEN) == 0) {
+                printw("%s resigned!",
                     gamestate->mycolor==WHITE?"White":"Black");
                 clrtoeol();
                 refresh();
@@ -253,22 +253,22 @@
         if (remisrejected) {
             printw(
                 "Use chess notation to enter your move.\n"
-                "Remis offer rejected - type 'surr' to surrender.      \n\n"
+                "Remis offer rejected - type 'resign' to resign.      \n\n"
                 "Type your move: ");
         } else {
             printw(
                 "Use chess notation to enter your move.\n"
-                "Or type 'surr' to surrender or 'remis' to offer remis.\n\n"
+                "Or type 'resign' to resign or 'remis' to offer remis.\n\n"
                 "Type your move: ");
         }
         clrtoeol();
         
         if (asyncgetnstr(movestr, &bufpos, MOVESTR_BUFLEN)) {
-            if (strncmp(movestr, "surr", MOVESTR_BUFLEN) == 0) {
-                printw("You surrendered!");
+            if (strncmp(movestr, "resign", MOVESTR_BUFLEN) == 0) {
+                printw("You resigned!");
                 clrtoeol();
                 refresh();
-                net_send_code(opponent, NETCODE_SURRENDER);
+                net_send_code(opponent, NETCODE_RESIGN);
                 return 1;
             } else if (strncmp(movestr, "remis", MOVESTR_BUFLEN) == 0) {
                 if (!remisrejected) {
@@ -364,8 +364,8 @@
                 printw("\rYour opponent's time ran out - you win!");
                 clrtoeol();
                 return 1;
-            case NETCODE_SURRENDER:
-                printw("\rYour opponent surrendered!");
+            case NETCODE_RESIGN:
+                printw("\rYour opponent resigned!");
                 clrtoeol();
                 return 1;
             case NETCODE_REMIS:
--- a/src/network.h	Wed Apr 16 22:20:59 2014 +0200
+++ b/src/network.h	Thu Apr 17 11:41:02 2014 +0200
@@ -44,7 +44,7 @@
 #define NETCODE_CHECK 0x22
 #define NETCODE_CHECKMATE 0x24
 #define NETCODE_STALEMATE 0x28
-#define NETCODE_SURRENDER 0x41
+#define NETCODE_RESIGN 0x41
 #define NETCODE_REMIS 0x42
 #define NETCODE_TIMEOVER 0x44
 

mercurial