Skip to content

Commit fe07ae4

Browse files
mstemberaglinscott
mstembera
authored andcommitted
Bitbase index() from ADD to OR.
No functional change. Resolves #132
1 parent 2c52147 commit fe07ae4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/bitbase.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ namespace {
4141
// bit 13-14: white pawn file (from FILE_A to FILE_D)
4242
// bit 15-17: white pawn RANK_7 - rank (from RANK_7 - RANK_7 to RANK_7 - RANK_2)
4343
unsigned index(Color us, Square bksq, Square wksq, Square psq) {
44-
return wksq + (bksq << 6) + (us << 12) + (file_of(psq) << 13) + ((RANK_7 - rank_of(psq)) << 15);
44+
return wksq | (bksq << 6) | (us << 12) | (file_of(psq) << 13) | ((RANK_7 - rank_of(psq)) << 15);
4545
}
4646

4747
enum Result {

0 commit comments

Comments
 (0)