Skip to main content

Module day02

Module day02 

Source
Expand description

§Bathroom Security

Relies heavily on the point and grid modules.

Functions§

code 🔒
Follows the instructions with the keypad centered on the origin, pushing the key reached at the end of each line. Moves that leave the keypad are ignored.
parse
part1
The square keypad is bounded by a square, starting on 5 in the middle.
part2
The diamond keypad is bounded by a diamond, starting on 5 at the left.