Author: Dan Honeycutt
Date: 10:02:08 01/06/06
Go up one level in this thread
On January 06, 2006 at 12:49:25, frogMeSebastian wrote:
>Hello all
>
>I have read a lot about the idea of bitboards and its use in chess programming,
>I fail, however, to get the idea of how to implement it in C.
>
>I have got something like this:
> unsigned long long int bb_WhitePawns
>
>Now let's say there is one single Pawn on A1. If I simply do
> bb_WhitePawns = 1000..0 (63 0)
>Then
> printf(" %i", bb_WhitePawns >> 1);
>would not return '0100..00' but some nonsense integer value.
>
>It seems to me that the compiler does not interprete the value as a 64-bit-word.
>What am I doing wrong?
This is from Crafty:
void Display64bitWord(BITBOARD word)
{
printf("%08x%08x\n", (int) (word >> 32), (int) word);
}
I'm going out on a limb and guess that frogMeSebastian is not your real name.
Best
Dan H.
This page took 0 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.