module Day13

Included Modules

Extended Modules

Defined in:

day13.cr

Constant Summary

CART_CHARS = {'>' => Dir::West, '<' => Dir::East, '^' => Dir::North, 'v' => Dir::South}
DIR_DELTA = {Dir::North => {0, -1}, Dir::South => {0, 1}, Dir::East => {-1, 0}, Dir::West => {1, 0}}
ROAD_CHARS = {'/' => Road::SlashTurn, '\\' => Road::BackslachTurn, '|' => Road::Vertical, '-' => Road::Horizontal, '+' => Road::Cross, ' ' => Road::Empty}
TURN_ORDER = {Turn::Left => Turn::Straight, Turn::Straight => Turn::Right, Turn::Right => Turn::Left}

Instance Method Summary

Instance methods inherited from module Day

run run, test1(input) test1, test2(input) test2

Instance Method Detail

def part1(input) #

[View source]
def part2(input) #

[View source]