X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=lasker-2.2.3%2Fsrc%2Fgameproc.c;h=e6e59bdd02639ea846e4e1280cfbf6afd5d79e2d;hb=0afd97c1ccfb2032d51206605a890fdc25ca99d8;hp=53147a8b836d2b26fd54013826e5dcf1282c7520;hpb=d5de5c406540b053c30e9732ae6c7b93c594bf27;p=capablanca.git diff --git a/lasker-2.2.3/src/gameproc.c b/lasker-2.2.3/src/gameproc.c index 53147a8..e6e59bd 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; @@ -609,6 +609,12 @@ printf("promo '%s'\n", command); pp->promote = MASTODON; break; // Shogi promotions + case 'h': + pp->promote = DRAGONHORSE; + break; + case 'd': + pp->promote = DRAGONKING; + break; case '^': case '+': pp->promote = GOLD;