case VariantSuper:
newHoldingsWidth = 2;
gameInfo.holdingsSize = 8;
- return;
+ break;
case VariantGothic:
case VariantCapablanca:
case VariantCapaRandom:
gameInfo.holdingsWidth = newHoldingsWidth;
gameInfo.variant = newVariant;
InitDrawingSizes(-2, 0);
- InitPosition(FALSE); /* this sets up board[0], but also other stuff */
- } else { gameInfo.variant = newVariant; InitPosition(FALSE); }
-
- DrawPosition(TRUE, boards[currentMove]);
+ InitPosition(TRUE); /* this sets up board[0], but also other stuff */
+ } else { gameInfo.variant = newVariant; InitPosition(TRUE); }
}
static int loggedOn = FALSE;
moves and soak them up so user can step
through them and/or save them.
*/
- Reset(FALSE, TRUE);
+ Reset(TRUE, TRUE);
gameMode = IcsObserving;
ModeHighlight();
ics_gamenum = -1;
&white_stren, &black_stren, &white_time, &black_time,
&moveNum, str, elapsed_time, move_str, &ics_flip,
&ticking);
-fprintf(debugFP, "old: %dx%d new: %dx%d weird=%d variant=%d\n",gameInfo.boardHeight,gameInfo.boardWidth,ranks,files,weird,gameInfo.variant);fflush(debugFP);
+
if (gameInfo.boardHeight != ranks || gameInfo.boardWidth != files ||
weird && (int)gameInfo.variant <= (int)VariantShogi) {
/* [HGM] We seem to switch variant during a game!
if(ranks == 8 && files == 10) newVariant = VariantCapablanca; else
if(ranks == 10 && files == 9) newVariant = VariantXiangqi; else
if(ranks == 8 && files == 12) newVariant = VariantCourier; else
- if(ranks == 9 && files == 9) newVariant = VariantShogi;
+ if(ranks == 9 && files == 9) newVariant = VariantShogi; else
+ if(!weird) newVariant = VariantNormal;
VariantSwitch(boards[currentMove], newVariant); /* temp guess */
/* Get a move list just to see the header, which
will tell us whether this is really bug or zh */
/* Forget the old game and get the history (if any) of the new one */
if (gameMode != BeginningOfGame) {
- Reset(FALSE, TRUE);
+ Reset(TRUE, TRUE);
}
newGame = TRUE;
if (appData.autoRaiseBoard) BoardToTop();
DisplayError(_("Bad FEN received from engine"), 0);
return ;
} else {
- Reset(FALSE, FALSE);
+ Reset(TRUE, FALSE);
CopyBoard(boards[0], initial_position);
initialRulePlies = FENrulePlies;
epStatus[0] = FENepStatus;
void
NextMatchGame P((void))
{
- int index; /* [HGM] autoinc: step lod index during match */
+ int index; /* [HGM] autoinc: step load index during match */
Reset(FALSE, TRUE);
if (*appData.loadGameFile != NULLCHAR) {
index = appData.loadGameIndex;