X-Git-Url: http://winboard.nl/cgi-bin?p=capablanca.git;a=blobdiff_plain;f=lasker-2.2.3%2Fsrc%2Fgameproc.c;h=b7aab88a792eb4d09010059fabf4969f31ca0f99;hp=ec6918cd4aa1d02737de7df72c5f9b273ff4bafa;hb=0673decdb041b796d55fe77e7e4eaf32895265b3;hpb=d047d3cf2718e831b4cb81aba3c4111c041fc22d diff --git a/lasker-2.2.3/src/gameproc.c b/lasker-2.2.3/src/gameproc.c index ec6918c..b7aab88 100644 --- a/lasker-2.2.3/src/gameproc.c +++ b/lasker-2.2.3/src/gameproc.c @@ -416,7 +416,7 @@ static int was_promoted(struct game *g, int f, int r) if (g->moveList[i].piecePromotionTo) { switch(g->moveList[i].moveString[0]) { // [HGM] return original piece type rather than just TRUE case 'P': return PAWN; - case 'N': return KNIGHT; + case 'N': return HONORABLEHORSE; // !!! this is Shogi, so no KNIGHT !!! case 'B': return BISHOP; case 'R': return ROOK; case 'L': return LANCE; @@ -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; @@ -890,13 +896,14 @@ static int CheckRepetition (int p, int g) if (game_globals.garray[g].numHalfMoves < 8) /* can't have three repeats any quicker. */ return 0; - for (move_num = game_globals.garray[g].game_state.lastIrreversable; + for (move_num = game_globals.garray[g].game_state.lastIrreversable - 1; // [HGM] FEN stored in moveList[numHalfMoves-1] ! move_num < game_globals.garray[g].numHalfMoves - 1; move_num++) { pos = GetFENpos (g, move_num); if (strlen(pos1) == strlen(pos) && !strcmp(pos1, pos)) flag1++; if (strlen(pos2) == strlen(pos) && !strcmp(pos2, pos)) flag2++; +printf("%2d. %d-%d %s %s %s\n", move_num, flag1, flag2, pos1,pos2,pos); } if (flag1 >= 3 || flag2 >= 3) { if ((pend = find_pend(pp->opponent, p, PEND_DRAW)) != NULL) {