Author: Steffen Jakob
Date: 09:21:26 07/18/02
Go up one level in this thread
Hi Bob!
On July 18, 2002 at 12:16:55, Robert Hyatt wrote:
>
>Extensions was a debugging tool. IE I used to have a parallel array with
>the PV in one element and the extensions for that ply in another. Then when
>I dumped the PV I could see which plies had extensions applied. I took that
>out a long time back to save the time of backing up the stuff when I really
>didn't care except on rare occasions during debugging.
>
>The rest are simply carry-overs. To me a&7 is clearer than a&CONST where I
>might not remember which bits are on in CONST...
I didn't think of making 7 const but something like this (from hossa-3.0 (aka
Jockel@ICC) source):
template <typename T> inline File getFile(const T &s) {
return static_cast<File>(static_cast<unsigned int>(s) & 7);
}
template <typename T> inline Rank getRank(const T &s) {
return static_cast<Rank>(static_cast<unsigned int>(s) >> 3);
}
or in C-world code
#define getFile(s) ((s)&7)
#define getRank(s) ((s)>>3)
Greetings,
Steffen.
This page took 0.01 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.