Computer Chess Club Archives


Search

Terms

Messages

Subject: a question about initializing bitboards

Author: Uri Blass

Date: 06:41:54 01/08/03


I want to initialize my pawn bitboards
I started by doing for every square of a pawn

pawnBB[color(square)]|=(1<<square);

I changed it to
pawnBB[color(square)]|=((Bitboard)1<<square);

Do I need to do it?

I suspected that the program may give me wrong value based on replacing my
perft command by a function that return perft|(1<<33) and I found that it
returns the correct perft without adding 1<<31 and only after I changed it to
(Bitboard)1 I got the right value.

Uri



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.