Ejemplo n.º 1
0
def run_part_1():
    initial_state = State()
    initial_state.read_initial_state()
    start_time = datetime.now()
    print(advent_tools.number_of_bfs_steps(initial_state))
    elapsed_time = datetime.now() - start_time
    print(elapsed_time)
Ejemplo n.º 2
0
def run_part_2():
    initial_state = State()
    initial_state.read_initial_state()
    initial_state.microchips[1].update(['elerium', 'dilithium'])
    initial_state.generators[1].update(['elerium', 'dilithium'])
    print(advent_tools.number_of_bfs_steps(initial_state))
Ejemplo n.º 3
0
def run_part_1():
    initial_state = MazeLocation(1, 1)
    print(advent_tools.number_of_bfs_steps(initial_state))
Ejemplo n.º 4
0
def run_part_2():
    state = PartTwo(np.zeros((37, 184)))
    state.init_from_file()
    print(advent_tools.number_of_bfs_steps(state))