浏览代码

fix en passant bug

Nicolas Winkler 2 年之前
父节点
当前提交
77f7dc97cf
共有 1 个文件被更改,包括 6 次插入0 次删除
  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 {
                         if (west_one(target_bb) | east_one(target_bb)) & opponent_pawns != 0 {
                             self.en_passant = Some(indices_from_square(mov.to).0);
                             self.en_passant = Some(indices_from_square(mov.to).0);
                         }
                         }
+                        else {
+                            self.en_passant = None
+                        }
+                    }
+                    else {
+                        self.en_passant = None
                     }
                     }
                 }
                 }
                 else {
                 else {