class Aoc2022::Day2

Defined in:

aoc2022/days/day2.cr

Constant Summary

MY_SHAPES = {"X" => Shape::ROCK, "Y" => Shape::PAPER, "Z" => Shape::SCISSORS}
OPONENT_SHAPES = {"A" => Shape::ROCK, "B" => Shape::PAPER, "C" => Shape::SCISSORS}
WINS = {Shape::ROCK => Shape::SCISSORS, Shape::PAPER => Shape::ROCK, Shape::SCISSORS => Shape::PAPER}

Instance Method Summary

Instance methods inherited from class Aoc2022::Day

part1 part1, part2 part2

Constructor methods inherited from class Aoc2022::Day

new(input_reader : InputReader) new

Instance Method Detail

def part1 : Int #

[View source]
def part2 : Int #

[View source]
def play_command(oponent : Shape, command : Command) : Int32 #

[View source]