diff --git a/src/board_state.rs b/src/board_state.rs index aabfcd1..fd8475c 100644 --- a/src/board_state.rs +++ b/src/board_state.rs @@ -153,7 +153,7 @@ impl Piece { let mut side_effects = SideEffects::default(); // move forward 1 or two steps as long as not blocked - if file_diff == 0 && (rank_diff == 2 && from.rank == en_passant_rank || rank_diff == 1) { + if file_diff == 0 && ((rank_diff == 2 && from.rank == en_passant_rank) || rank_diff == 1) { let mut path_rank = from.rank.clone(); while let Some(rank) = forward(&path_rank) {