Beispiel #1
0
def aoc2_a(p1, p2):
    program = parse_file(2)
    program[1:3] = p1, p2
    return first(process_no_yield(program))
Beispiel #2
0
def aoc13_a():
    arcade = Arcade()
    arcade.run(parse_file(13))
    print(Counter(arcade.board.values()))
    print(arcade.board_dimensions)
    return sum(v is Tile.block for v in arcade.board.values())
Beispiel #3
0
def aoc13_b():
    arcade = PlayArcade()
    program = parse_file(13, arcade.adjust_joystick())
    program[0] = 2
    arcade.run(program)
    return arcade.score
Beispiel #4
0
 def test9(self):
     assert process_no_yield(parse_file(9,
                                        [1])).output_register == 2738720997
     assert process_no_yield(parse_file(9, [2])).output_register == 50894
Beispiel #5
0
def __main():
    rd = RepairDroid(parse_file(15))
    print(rd.run())
Beispiel #6
0
def aoc11_a():
    ac = ASCIIComp(parse_file(17))
    print(ac.scaffold_str)
    print(ac.run())
Beispiel #7
0
def aoc11_b():
    robot = HullRobot(1)
    program = parse_file(11, robot.cur_color())
    program.suppress_output = True
    robot.run(program)
    robot.draw()
Beispiel #8
0
def aoc11_a():
    robot = HullRobot()
    program = parse_file(11, robot.cur_color())
    program.suppress_output = True
    return robot.run(program)