Nicolas Winkler 6 年 前
コミット
f48578a6fd
1 ファイル変更1 行追加1 行削除
  1. 1 1
      src/movegen.rs

+ 1 - 1
src/movegen.rs

@@ -44,7 +44,7 @@ impl Iterator for BitboardIterator {
     fn next(&mut self) -> Option<Bitboard> {
         if self.board != 0 {
             let lsb = self.board & (0_u64.wrapping_sub(self.board));
-            self.board &= !lsb;
+            self.board ^= lsb;
             //Some(lsb.trailing_zeros())
             Some(lsb)
         } else {