The parser already understood double-digit numbers on input, and
CoordsToAlgebraic produced them on otput. This patch also fixes sending
of the moves to the computer, for which the moveList was used. The latter
stored 10 as ':', etc,to always get a 4-char move, the characters of which
were frequently being converted to fromY or toY by adding/subtracting ONE.
To not break that the one-character encoding of rank number is kept in
moveList, but in SendMoveToProgram, characters > '9' are converted to
double digits.
else SendToProgram("O-O-O\n", cps);
}
else SendToProgram(moveList[moveNum], cps);
+ } else
+ if(BOARD_HEIGHT > 10) { // [HGM] big: convert ranks to double-digit where needed
+ snprintf(buf, MSG_SIZ, "%c%d%c%d%s", moveList[moveNum][0], moveList[moveNum][1] - '0',
+ moveList[moveNum][2], moveList[moveNum][3] - '0', moveList[moveNum]+4);
+ SendToProgram(buf, cps);
}
else SendToProgram(moveList[moveNum], cps);
/* End of additions by Tord */