diff --git a/17/src/main.rs b/17/src/main.rs index fa5cafb..4a164ab 100644 --- a/17/src/main.rs +++ b/17/src/main.rs @@ -311,6 +311,7 @@ impl<'a> WalkCost2<'a> { weight: cur_move.weight + self.map.map[new_pos.1][new_pos.0], }) }) + .filter(|m| m.new_pos != self.start) .filter(|m| *m.dir != cur_move.dir.opposite()) .filter(|m| { if m.dir == cur_move.dir {