day17: don't revisit the start position
This commit is contained in:
parent
3ee26cefe5
commit
e65c17c8e6
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user