Pārlūkot izejas kodu

fix en passant bug

Nicolas Winkler 2 gadi atpakaļ
vecāks
revīzija
77f7dc97cf
1 mainītis faili ar 6 papildinājumiem un 0 dzēšanām
  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 {