int i, j, k, w=0, subst=0, shuffle=0, wKingRank = -1, bKingRank = -1;
char *p, c;
int emptycount, virgin[BOARD_FILES];
- ChessSquare piece;
+ ChessSquare piece, king = (gameInfo.variant == VariantKnightmate ? WhiteUnicorn : WhiteKing);
p = fen;
p++;
}
board[i][(j++)+gameInfo.holdingsWidth] = piece;
- if(piece == WhiteKing) wKingRank = i;
- if(piece == BlackKing) bKingRank = i;
+ if(piece == king) wKingRank = i;
+ if(piece == WHITE_TO_BLACK king) bKingRank = i;
} else {
return FALSE;
}