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
     1.1 --- a/src/game.c	Wed Apr 16 22:20:59 2014 +0200
     1.2 +++ b/src/game.c	Thu Apr 17 11:41:02 2014 +0200
     1.3 @@ -188,13 +188,13 @@
     1.4          move(inputy, 0);
     1.5          printw(
     1.6              "Use chess notation to enter your move.\n"
     1.7 -            "Or type 'surr' to surrender or 'remis' to end with remis.\n\n"
     1.8 +            "Or type 'resign' to resign or 'remis' to end with remis.\n\n"
     1.9              "Type your move: ");
    1.10          clrtoeol();
    1.11          
    1.12          if (asyncgetnstr(movestr, &bufpos, MOVESTR_BUFLEN)) {
    1.13 -            if (strncmp(movestr, "surr", MOVESTR_BUFLEN) == 0) {
    1.14 -                printw("%s surrendered!",
    1.15 +            if (strncmp(movestr, "resign", MOVESTR_BUFLEN) == 0) {
    1.16 +                printw("%s resigned!",
    1.17                      gamestate->mycolor==WHITE?"White":"Black");
    1.18                  clrtoeol();
    1.19                  refresh();
    1.20 @@ -253,22 +253,22 @@
    1.21          if (remisrejected) {
    1.22              printw(
    1.23                  "Use chess notation to enter your move.\n"
    1.24 -                "Remis offer rejected - type 'surr' to surrender.      \n\n"
    1.25 +                "Remis offer rejected - type 'resign' to resign.      \n\n"
    1.26                  "Type your move: ");
    1.27          } else {
    1.28              printw(
    1.29                  "Use chess notation to enter your move.\n"
    1.30 -                "Or type 'surr' to surrender or 'remis' to offer remis.\n\n"
    1.31 +                "Or type 'resign' to resign or 'remis' to offer remis.\n\n"
    1.32                  "Type your move: ");
    1.33          }
    1.34          clrtoeol();
    1.35          
    1.36          if (asyncgetnstr(movestr, &bufpos, MOVESTR_BUFLEN)) {
    1.37 -            if (strncmp(movestr, "surr", MOVESTR_BUFLEN) == 0) {
    1.38 -                printw("You surrendered!");
    1.39 +            if (strncmp(movestr, "resign", MOVESTR_BUFLEN) == 0) {
    1.40 +                printw("You resigned!");
    1.41                  clrtoeol();
    1.42                  refresh();
    1.43 -                net_send_code(opponent, NETCODE_SURRENDER);
    1.44 +                net_send_code(opponent, NETCODE_RESIGN);
    1.45                  return 1;
    1.46              } else if (strncmp(movestr, "remis", MOVESTR_BUFLEN) == 0) {
    1.47                  if (!remisrejected) {
    1.48 @@ -364,8 +364,8 @@
    1.49                  printw("\rYour opponent's time ran out - you win!");
    1.50                  clrtoeol();
    1.51                  return 1;
    1.52 -            case NETCODE_SURRENDER:
    1.53 -                printw("\rYour opponent surrendered!");
    1.54 +            case NETCODE_RESIGN:
    1.55 +                printw("\rYour opponent resigned!");
    1.56                  clrtoeol();
    1.57                  return 1;
    1.58              case NETCODE_REMIS:
     2.1 --- a/src/network.h	Wed Apr 16 22:20:59 2014 +0200
     2.2 +++ b/src/network.h	Thu Apr 17 11:41:02 2014 +0200
     2.3 @@ -44,7 +44,7 @@
     2.4  #define NETCODE_CHECK 0x22
     2.5  #define NETCODE_CHECKMATE 0x24
     2.6  #define NETCODE_STALEMATE 0x28
     2.7 -#define NETCODE_SURRENDER 0x41
     2.8 +#define NETCODE_RESIGN 0x41
     2.9  #define NETCODE_REMIS 0x42
    2.10  #define NETCODE_TIMEOVER 0x44
    2.11  

mercurial