diff --git a/2020/src/bin/day17.rs b/2020/src/bin/day17.rs index 9bed3a6..4d15c2f 100644 --- a/2020/src/bin/day17.rs +++ b/2020/src/bin/day17.rs @@ -24,6 +24,7 @@ fn make_step(input: Grid) -> Grid { input .fields .keys() + .filter(|&&p| readonly.get(p) == Cell::Alive) .flat_map(|p| p.neighbors()) .map(|pos| { let cell = readonly.get(pos);