Module day23

Module day23 

Source
Expand description

§Unstable Diffusion

We represent elves as bits in an integer then use bitwise operations to efficiently figure out the movement for multiple elves at once.

Modules§

scalar 🔒

Structs§

Input

Enums§

Direction 🔒

Constants§

HEIGHT 🔒
The initial grid is 70 x 70. Elves stop moving when no other elf is adjacent so the grid will expand at most 70 in any direction, giving 70 + 70 + 70 = 210 total.

Functions§

parse
Converts the ASCII grid into a bit per elf.
part1
part2
step 🔒