{ "holdingsSize", ArgInt, (void *) &appData.holdingsSize, TRUE, (ArgIniType) -1 },
{ "matchPause", ArgInt, (void *) &appData.matchPause, TRUE, (ArgIniType) 10000 },
{ "pieceToCharTable", ArgString, (void *) &appData.pieceToCharTable, FALSE, INVALID },
+ { "pieceNickNames", ArgString, (void *) &appData.pieceNickNames, FALSE, INVALID },
{ "flipBlack", ArgBoolean, (void *) &appData.upsideDown, TRUE, (ArgIniType) FALSE },
{ "allWhite", ArgBoolean, (void *) &appData.allWhite, TRUE, (ArgIniType) FALSE },
{ "alphaRank", ArgBoolean, (void *) &appData.alphaRank, FALSE, (ArgIniType) FALSE },
char *SendMoveToBookUser P((int nr, ChessProgramState *cps, int initial)); // [HGM] book
void ics_update_width P((int new_width));
extern char installDir[MSG_SIZ];
+VariantClass startVariant; /* [HGM] nicks: initial variant */
extern int tinyLayout, smallLayout;
ChessProgramStats programStats;
int matched, min, sec;
ShowThinkingEvent(); // [HGM] thinking: make sure post/nopost state is set according to options
+ startVariant = StringToVariant(appData.variant); // [HGM] nicks: remember original variant
GetTimeMark(&programStartTime);
srandom((programStartTime.ms + 1000*programStartTime.sec)*0x1001001); // [HGM] book: makes sure random is unpredictabe to msec level
for(i=0; i<BOARD_FILES-2; i++)
initialPosition[CASTLING][i] = initialRights[i] = NoRights; /* but no rights yet */
initialPosition[EP_STATUS] = EP_NONE;
- SetCharTable(pieceToChar, "PNBRQ...........Kpnbrq...........k");
+ SetCharTable(pieceToChar, "PNBRQ...........Kpnbrq...........k");
+ if(startVariant == gameInfo.variant) // [HGM] nicks: enable nicknames in original variant
+ SetCharTable(pieceNickName, appData.pieceNickNames);
+ else SetCharTable(pieceNickName, "............");
switch (gameInfo.variant) {
case VariantFischeRandom:
int holdingsSize;
int matchPause;
char * pieceToCharTable;
+ char * pieceNickNames;
Boolean allWhite;
Boolean upsideDown;
Boolean alphaRank;
'p', 'n', 'b', 'r', 'q', 'f', 'e', 'a', 'c', 'w', 'm',
'o', 'h', 'i', 'j', 'g', 'd', 'v', 'l', 's', 'u', 'k',
'x' };
+char pieceNickName[EmptySquare];
char PieceToChar(p)
ChessSquare p;
{
int i;
for(i=0; i< (int) EmptySquare; i++)
+ if(pieceNickName[i] == c) return (ChessSquare) i;
+ for(i=0; i< (int) EmptySquare; i++)
if(pieceToChar[i] == c) return (ChessSquare) i;
return EmptySquare;
}
extern void CopyBoard P((Board to, Board from));
extern int CompareBoards P((Board board1, Board board2));
extern char pieceToChar[(int)EmptySquare+1];
+extern char pieceNickName[(int)EmptySquare];
typedef void (*MoveCallback) P((Board board, int flags, ChessMove kind,
int rf, int ff, int rt, int ft,