Browse Source

fix en passant bug

Nicolas Winkler 2 năm trước cách đây
mục cha
commit
77f7dc97cf
1 tập tin đã thay đổi với 6 bổ sung0 xóa
  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 {