mirror of
https://github.com/bertptrs/adventofcode.git
synced 2025-12-25 21:00:31 +01:00
Implement 2024 day 16 part 1
This commit is contained in:
15
2024/tests/samples/16.1.txt
Normal file
15
2024/tests/samples/16.1.txt
Normal file
@@ -0,0 +1,15 @@
|
||||
###############
|
||||
#.......#....E#
|
||||
#.#.###.#.###.#
|
||||
#.....#.#...#.#
|
||||
#.###.#####.#.#
|
||||
#.#.#.......#.#
|
||||
#.#.#####.###.#
|
||||
#...........#.#
|
||||
###.#.#####.#.#
|
||||
#...#.....#.#.#
|
||||
#.#.#.###.#.#.#
|
||||
#.....#...#.#.#
|
||||
#.###.#.#.#.#.#
|
||||
#S..#.....#...#
|
||||
###############
|
||||
17
2024/tests/samples/16.2.txt
Normal file
17
2024/tests/samples/16.2.txt
Normal file
@@ -0,0 +1,17 @@
|
||||
#################
|
||||
#...#...#...#..E#
|
||||
#.#.#.#.#.#.#.#.#
|
||||
#.#.#.#...#...#.#
|
||||
#.#.#.#.###.#.#.#
|
||||
#...#.#.#.....#.#
|
||||
#.#.#.#.#.#####.#
|
||||
#.#...#.#.#.....#
|
||||
#.#.#####.#.###.#
|
||||
#.#.#.......#...#
|
||||
#.#.###.#####.###
|
||||
#.#.#...#.....#.#
|
||||
#.#.#.#####.###.#
|
||||
#.#.#.........#.#
|
||||
#.#.#.#########.#
|
||||
#S#.............#
|
||||
#################
|
||||
16
2024/tests/test_day16.py
Normal file
16
2024/tests/test_day16.py
Normal file
@@ -0,0 +1,16 @@
|
||||
import pytest
|
||||
|
||||
from aoc.days.day16 import DayRunner
|
||||
|
||||
from . import get_data
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"data,result",
|
||||
[
|
||||
(get_data(16, 1), 7036),
|
||||
(get_data(16, 2), 11048),
|
||||
],
|
||||
)
|
||||
def test_sample_part1(data: str, result: int) -> None:
|
||||
assert DayRunner.part1(data) == result
|
||||
Reference in New Issue
Block a user