X-Git-Url: http://winboard.nl/cgi-bin?p=capablanca.git;a=blobdiff_plain;f=lasker-2.2.3%2Fsrc%2Fgameproc.c;h=c5f5d35b3c9859df81dc141ccffee3bbbc01f892;hp=b7aab88a792eb4d09010059fabf4969f31ca0f99;hb=15d6762279fb7e4c1fecc81699507d9011287779;hpb=0673decdb041b796d55fe77e7e4eaf32895265b3 diff --git a/lasker-2.2.3/src/gameproc.c b/lasker-2.2.3/src/gameproc.c index b7aab88..c5f5d35 100644 --- a/lasker-2.2.3/src/gameproc.c +++ b/lasker-2.2.3/src/gameproc.c @@ -525,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; @@ -561,9 +561,9 @@ void process_move(int p, char *command) } pp->promote = NOPIECE; // [HGM] this seemed to be uninitialized, which caused spurious promotion in Shogi if ((len = strlen(command)) > 1) { - if (command[len - 2] == '=') { + 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; @@ -608,6 +608,12 @@ printf("promo '%s'\n", command); case 'g': pp->promote = MASTODON; break; + case 'l': + pp->promote = LIEUTENANT; + break; + case 'k': + pp->promote = KING; + break; // Shogi promotions case 'h': pp->promote = DRAGONHORSE;