On 09/02/2012 12:01 AM, Mark Higgins wrote:
> Can anyone point me to a function to convert the keys in the benchmark dbs to
> a board layout pls?
>
> They don't look like 14-char position IDs, and checking this list archive I
> see them occasionally referred to as Joseph-ID.
>
Thanks to Philippe, the code I think you are looking for is now in
gnubg.c. Philippe committed a change last month that allows the "set
board" command to take a gnubg-nn ID (Which I think is what you are
referring to) and allow it to be used to setup a position in GNUBG. If
you want this feature I can build a windows release tomorrow. The
excerpt from the source code that does the work is here:
if( strlen(pch) == 20) { /* gnubg-nn position string */
static oldpositionkey key;
for(i = 0; i < 10; ++i) {
key.auch[i] = ((pch[2*i+0] - 'A') << 4) + (pch[2*i+1] - 'A');
}
oldPositionFromKey( an, &key);
return 0;
}
The above is a snippet from GNUBG.C in the function
extern int ParsePosition( TanBoard an, char **ppch, char *pchDesc )
which was added by Philippe.
--
Michael Petch
CApp::Sysware Consulting Ltd.
OpenPGP FingerPrint=D81C 6A0D 987E 7DA5 3219 6715 466A 2ACE 5CAE 3304
_______________________________________________
Bug-gnubg mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-gnubg