class

Day21

Inherits Day < Reference < Object

Constants

CONTROL_BUTTON_POSITIONS = {'x' => {0_i128, 0_i128}, '^' => {1_i128, 0_i128}, 'A' => {2_i128, 0_i128}, '<' => {0_i128, 1_i128}, 'v' => {1_i128, 1_i128}, '>' => {2_i128, 1_i128}} of Char => Point
DOOR_BUTTON_POSITIONS = {'7' => {0_i128, 0_i128}, '8' => {1_i128, 0_i128}, '9' => {2_i128, 0_i128}, '4' => {0_i128, 1_i128}, '5' => {1_i128, 1_i128}, '6' => {2_i128, 1_i128}, '1' => {0_i128, 2_i128}, '2' => {1_i128, 2_i128}, '3' => {2_i128, 2_i128}, 'x' => {0_i128, 3_i128}, '0' => {1_i128, 3_i128}, 'A' => {2_i128, 3_i128}} of Char => Point

Constructors

Instance methods

calculate_total_moves(sequence : String, max_depth : Int128) : Int128
Source
inner_robot_press(dest : Char, depth : Int128, max_depth : Int128) : Int128
Source
keypad_robot_press(dest : Char, max_depth : Int128) : Int128
Source
part1(input)
Source
part2(input)
Source
sequence
Source
sequence=(sequence)
Source

Nested types