Nicolas Winkler %!s(int64=6) %!d(string=hai) anos
pai
achega
f48578a6fd
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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 {