Module advent_solutions::advent2017::day22 [] [src]

Day 22: Sporifica Virus

Diagnostics indicate that the local grid computing cluster has been contaminated with the Sporifica Virus. The grid computing cluster is a seemingly- infinite two-dimensional grid of compute nodes. Each node is either clean or infected by the virus.

Structs

Carrier

To prevent overloading the nodes (which would render them useless to the virus) or detection by system administrators, exactly one virus carrier moves through the network, infecting or cleaning nodes as it moves. The virus carrier is always located on a single node in the network (the current node) and keeps track of the direction it is facing.

Memory

Diagnostics have also provided a map of the node infection status (your puzzle input). Clean nodes are shown as .; infected nodes are shown as #. This map only shows the center of the grid; there are many more nodes beyond those shown, but none of them are currently infected.

Enums

Node

Functions

parse_input
part1
part2
part1_with_bursts

For example, suppose you are given a map like this:

part2_with_bursts

Start with the same map (still using . for clean and # for infected) and still with the virus carrier starting in the middle and facing up.