m[5], m[6] - '0',
m[5], m[6] - '0',
m[2], m[3] - '0', c);
- } else
+ } else if(gameInfo.variant == VariantDuck)
+ snprintf(buf, MSG_SIZ, "%c%d%c%d,%c%d%c%d%s\n", m[0], m[1] - '0', // convert to two moves
+ m[2], m[3] - '0',
+ m[2], m[3] - '0',
+ m[5], m[6] - '0', c);
+ else
snprintf(buf, MSG_SIZ, "%c%d%c%d,%c%d%c%d%s\n", m[0], m[1] - '0', // convert to two moves
m[5], m[6] - '0',
m[5], m[6] - '0',
*/
if((gameMode == TwoMachinesPlay ? second.offeredDraw : userOfferedDraw) || first.offeredDraw ) {
char *p = NULL;
- if((signed char)boards[forwardMostMove][EP_STATUS] == EP_RULE_DRAW)
+ if((signed char)boards[forwardMostMove][EP_STATUS] == EP_RULE_DRAW)- safeStrCpy(machineMove, firstLeg, 20); machineMove[strlen(machineMove)-1] = 0;
+
p = "Draw claim: 50-move rule";
if((signed char)boards[forwardMostMove][EP_STATUS] == EP_REP_DRAW)
p = "Draw claim: 3-fold repetition";
// [HGM] lion: (some very limited) support for Alien protocol
killX = killY = kill2X = kill2Y = -1;
- if(machineMove[strlen(machineMove)-1] == ',') { // move ends in coma: non-final leg of composite move
+ if(machineMove[strlen(machineMove)-1] == ',') { // move ends in comma: non-final leg of composite move
if(legs++) return; // middle leg contains only redundant info, ignore (but count it)
safeStrCpy(firstLeg, machineMove, 20); // just remember it for processing when second leg arrives
return;
char buf[20], *p = machineMove+1, *q = buf+1, f;
if(gameInfo.variant == VariantDuck) { // Duck Chess: 1st leg is FIDE move, 2nd is Duck
sscanf(machineMove, "%c%d%c%d", &f, &killY, &f, &killY); killX = f - AAA; killY -= ONE - '0';
- safeStrCpy(machineMove, firstLeg, 20);
+ safeStrCpy(machineMove, firstLeg, 20); machineMove[strlen(machineMove)-1] = 0;
} else {
// only support case where same piece makes two step
safeStrCpy(buf, machineMove, 20);
}\r
languageBuf[--i] = k;\r
\r
+\r
}\r
i++;\r
}\r
pieceBitmap[0][WhiteGnu] = DoLoadBitmap(hInst, "gnu", squareSize, "s");\r
pieceBitmap[1][WhiteGnu] = DoLoadBitmap(hInst, "gnu", squareSize, "o");\r
pieceBitmap[2][WhiteGnu] = DoLoadBitmap(hInst, "gnu", squareSize, "w");\r
- if(gameInfo.variant == VariantDuck) { char name[20]; sprintf(name, " ducky%d", squareSize); ducky = LoadBitmap(hInst, name); }\r
+ if(gameInfo.variant == VariantDuck) { char name[20]; sprintf(name, "ducky%d", squareSize); ducky = LoadBitmap(hInst, name); }\r
\r
if(gameInfo.variant == VariantShogi && BOARD_HEIGHT != 7) { /* promoted Gold representations (but not in Tori!)*/\r
pieceBitmap[0][WhiteCannon] = DoLoadBitmap(hInst, "wp", squareSize, "s");\r
}\r
if(column == BOARD_LEFT-1 ) /* left align */\r
DisplayHoldingsCount(hdc, x, y, flipView, (int) board[row][column]);\r
- else if( column == BOARD_RGHT) /* right align */\r
+ else if( column == BOARD_RGHT) /* right align */squareSize, \r
DisplayHoldingsCount(hdc, x, y, !flipView, (int) board[row][column]);\r
else if( piece == DarkSquare) {\r
if(gameInfo.variant == VariantDuck && ducky) {\r
HBITMAP oldBitmap = SelectObject(tmphdc, ducky);\r
- BitBlt( hdc, x, y, squareSize, tmphdc, 0, 0, SRCPAINT );\r
+ BitBlt( hdc, x, y, squareSize, squareSize, tmphdc, 0, 0, SRCPAINT );\r
SelectObject(tmphdc, oldBitmap);\r
} else DisplayHoldingsCount(hdc, x, y, 0, 0);\r
} else\r
appData.oldSaveStyle ? "pos" : "fen",\r
POSITION_FILT,\r
_("Save Position to File"), NULL, fileTitle, NULL);\r
- SetCurrentDirectory(MSG_SIZ, dir);\r
+ SetCurrentDirectory(dir);\r
if (f != NULL) {\r
SavePosition(f, 0, "");\r
}\r
\r
}\r
return err;\r
+\r
}\r
\r
/* [AS] If input is line by line and a line exceed the buffer size, force an error */\r