Skip to content

Commit

Permalink
Bitbase index() from ADD to OR.
Browse files Browse the repository at this point in the history
No functional change.

Resolves #132
  • Loading branch information
mstembera authored and glinscott committed Nov 25, 2014
1 parent 2c52147 commit fe07ae4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bitbase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ namespace {
// bit 13-14: white pawn file (from FILE_A to FILE_D)
// bit 15-17: white pawn RANK_7 - rank (from RANK_7 - RANK_7 to RANK_7 - RANK_2)
unsigned index(Color us, Square bksq, Square wksq, Square psq) {
return wksq + (bksq << 6) + (us << 12) + (file_of(psq) << 13) + ((RANK_7 - rank_of(psq)) << 15);
return wksq | (bksq << 6) | (us << 12) | (file_of(psq) << 13) | ((RANK_7 - rank_of(psq)) << 15);
}

enum Result {
Expand Down

0 comments on commit fe07ae4

Please sign in to comment.