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