# HG changeset patch # User Mike Becker # Date 1397727662 -7200 # Node ID 1891d88cbd109536d3b02abfff72255c4d500ffc # Parent 12141136a0da1cb861cd9128d4b4aa8ce50dd9e2 surrender is now resign diff -r 12141136a0da -r 1891d88cbd10 src/game.c --- 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: diff -r 12141136a0da -r 1891d88cbd10 src/network.h --- 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