In one game, Symbolic's simple, not-yet-pondering single threaded search got it into a position which resulted in a draw by the fifty move rule. (It was tscp which made the 100th consecutive quiet move.) But apparently XBoard didn't see or adjudicate the draw and instead told Symbolic to make a move. Well, Symbolic is kind of stubborn and doesn't like to move after a game is drawn.
If it makes any difference, Symbolic's XBoard support in its current state uses protocol version one only. The program recognizes only 22 commands:
Code: Select all
const std::string XbdCoPro::cmdstrvec[XcpCLen] =
{
"black",
"computer",
"easy",
"force",
"go",
"hard",
"hint",
"level",
"new",
"nopost",
"otim",
"post",
"quit",
"random",
"remove",
"result",
"sd",
"st",
"time",
"undo",
"white",
"xboard"
};
Code: Select all
XcpC XbdCoPro::MatchName(const std::string& verb)
{
XcpC result = XcpCNil;
si lo = 0, hi = XcpCLen - 1;
while (IsXcpCNil(result) && (lo <= hi))
{
const si mi = (lo + hi) / 2;
if (verb == cmdstrvec[mi])
result = (XcpC) mi;
else
{
if (verb < cmdstrvec[mi])
hi = mi - 1;
else
lo = mi + 1;
};
};
return result;
}
Code: Select all
void XbdCoPro::Dispatch(void)
{
const TokenNodePtr tnptr = tokens.GetHead();
if (tnptr)
{
const XcpC xcpc = MatchName(tnptr->RefStr());
if (IsXcpCNotNil(xcpc))
{
switch (xcpc)
{
case XcpCblack: DoCblack(); break;
case XcpCcomputer: DoCcomputer(); break;
case XcpCeasy: DoCeasy(); break;
case XcpCforce: DoCforce(); break;
case XcpCgo: DoCgo(); break;
case XcpChard: DoChard(); break;
case XcpChint: DoChint(); break;
case XcpClevel: DoClevel(); break;
case XcpCnew: DoCnew(); break;
case XcpCnopost: DoCnopost(); break;
case XcpCotim: DoCotim(); break;
case XcpCpost: DoCpost(); break;
case XcpCquit: DoCquit(); break;
case XcpCrandom: DoCrandom(); break;
case XcpCremove: DoCremove(); break;
case XcpCresult: DoCresult(); break;
case XcpCsd: DoCsd(); break;
case XcpCst: DoCst(); break;
case XcpCtime: DoCtime(); break;
case XcpCundo: DoCundo(); break;
case XcpCwhite: DoCwhite(); break;
case XcpCxboard: DoCxboard(); break;
default:
SwitchFault("XbdCoPro::Dispatch");
break;
};
if (!isrunning)
LogMsg("XbdCoPro::Dispatch: quit commanded");
}
else
{
// Handle move input
Move move;
if (!move.DecodeUCI(tokens.Arg(0), MyPosition()))
WriteLn("Unregonized input");
else
{
OppoMove(move);
if ((progcolor != ColorVacant) && MyGame().IsNotOver())
ProgMove(CalcMove());
};
};
};
}