X-Git-Url: http://winboard.nl/cgi-bin?p=capablanca.git;a=blobdiff_plain;f=lasker-2.2.3%2Fsrc%2Fgameproc.c;h=e6e59bdd02639ea846e4e1280cfbf6afd5d79e2d;hp=4f50fa464de5ecb5d37ec6c0dfab02be7deee141;hb=5317b80b41045bd23473faf4748a9539a06e5f52;hpb=3f31178e2168d0dc5ca0db4e245c63c25bb7ed1d diff --git a/lasker-2.2.3/src/gameproc.c b/lasker-2.2.3/src/gameproc.c index 4f50fa4..e6e59bd 100644 --- a/lasker-2.2.3/src/gameproc.c +++ b/lasker-2.2.3/src/gameproc.c @@ -434,18 +434,6 @@ static int was_promoted(struct game *g, int f, int r) return 0; } -static int is_virgin(struct game *g, int f, int r) -{ - int i; - - for (i = g->numHalfMoves-2; i > 0; i -= 2) { - if (g->moveList[i].toFile == f && g->moveList[i].toRank == r) { - return 0; - } - } - return 1; -} - int pIsPlaying (int p) { struct player *pp = &player_globals.parray[p]; @@ -537,7 +525,7 @@ void process_move(int p, char *command) { struct player *pp = &player_globals.parray[p]; struct game *gg; - int g, result, len, i; + int g, result, len, i, f; struct move_t move; unsigned now = 0; @@ -575,7 +563,7 @@ void process_move(int p, char *command) if ((len = strlen(command)) > 1) { if (command[len - 2] == '=' || gg->game_state.drops == 2 && command[len - 2] == '/') { // [HGM] encode gating as promotion printf("promo '%s'\n", command); - switch (tolower(command[strlen(command) - 1])) { + switch (tolower(command[len - 1])) { case 'n': pp->promote = KNIGHT; break;