Explorar o código

fix en passant bug

Nicolas Winkler %!s(int64=2) %!d(string=hai) anos
pai
achega
77f7dc97cf
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  1. 6 0
      src/game.rs

+ 6 - 0
src/game.rs

@@ -646,6 +646,12 @@ impl Game {
                         if (west_one(target_bb) | east_one(target_bb)) & opponent_pawns != 0 {
                             self.en_passant = Some(indices_from_square(mov.to).0);
                         }
+                        else {
+                            self.en_passant = None
+                        }
+                    }
+                    else {
+                        self.en_passant = None
                     }
                 }
                 else {