diff --git a/2025/index.php b/2025/index.php index 451a708..e57fbc7 100644 --- a/2025/index.php +++ b/2025/index.php @@ -4,6 +4,7 @@ require_once __DIR__ . '/vendor/autoload.php'; use Aoc2025\Days\Day1; use Aoc2025\Days\Day2; +use Aoc2025\Days\Day3; use Aoc2025\Services\Template; @@ -43,6 +44,9 @@ $day_1_answer = $day_1->run(); $day_2 = new Day2(); $day_2_answer = $day_2->run(); +// Day 3. +$day_3 = new Day3(); +$day_3_answer = $day_3->run(); // Render the template. $template = new Template('main.html'); @@ -51,6 +55,8 @@ $substitutions = [ 'day_1_answer_2' => $day_1_answer['part_2'], 'day_2_answer' => $day_2_answer['part_1'], 'day_2_answer_2' => $day_2_answer['part_2'], + 'day_3_answer' => $day_3_answer['part_1'], + 'day_3_answer_2' => $day_3_answer['part_2'], ]; $response = $template->render($substitutions); diff --git a/2025/inputs/day_3_input.txt b/2025/inputs/day_3_input.txt new file mode 100644 index 0000000..7255fca --- /dev/null +++ b/2025/inputs/day_3_input.txt @@ -0,0 +1,4 @@ +987654321111111 +811111111111119 +234234234234278 +818181911112111 diff --git a/2025/src/Days/Day2.php b/2025/src/Days/Day2.php index 211a085..c78f320 100644 --- a/2025/src/Days/Day2.php +++ b/2025/src/Days/Day2.php @@ -1,5 +1,7 @@ getInputFile('day_3_input.txt'); + + return [ + 'part_1' => 'tes', + 'part_2' => 'hello', + ]; + } +} diff --git a/2025/templates/main.html b/2025/templates/main.html index d1590d3..e61b895 100644 --- a/2025/templates/main.html +++ b/2025/templates/main.html @@ -34,8 +34,8 @@
Part 1:
-Part 2:
+Part 1: {{ day_3_answer }}
+Part 2: {{ day_3_answer_2 }}