bug-gnubg
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-gnubg] "Joseph-ID" in benchmark db


From: Michael Petch
Subject: Re: [Bug-gnubg] "Joseph-ID" in benchmark db
Date: Thu, 09 Feb 2012 00:33:05 -0700
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20111105 Thunderbird/8.0

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]