class Days::Day08

Defined in:

days/day_08.cr

Constant Summary

COND_MATCHER = /if (?<cond_left>\w+) (?<cond_op>.{1,2}) (?<cond_right>-?\d+)/
MATCHER = /^(?<dest>\w+) (?<op>inc|dec) (?<offset>-?\d+) #{COND_MATCHER}$/

Constructors

Instance Method Summary

Instance methods inherited from class Challenge

part_one part_one, run(part) run

Constructor methods inherited from class Challenge

new(input : String) new

Constructor Detail

def self.new(input) #

[View source]

Instance Method Detail

def cond(left, op, right) #

[View source]
def dec(address, offset) #

[View source]
def execute(dest, op, offset) #

[View source]
def inc(address, offset) #

[View source]
def part_one #

[View source]
def part_two #

[View source]
def read(address) #

[View source]
def run_instructions(&) #

[View source]
def run_instructions #

[View source]