Start of day 3.

This commit is contained in:
dan612 2025-12-13 10:59:52 -05:00
parent 3f2ac3a266
commit 4ad017f909
5 changed files with 31 additions and 2 deletions

View File

@ -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);

View File

@ -0,0 +1,4 @@
987654321111111
811111111111119
234234234234278
818181911112111

View File

@ -1,5 +1,7 @@
<?php
namespace Aoc2025\Days;
use Aoc2025\Day;
class Day2 extends Day {

17
2025/src/Days/Day3.php Normal file
View File

@ -0,0 +1,17 @@
<?php
namespace Aoc2025\Days;
use Aoc2025\Day;
class Day3 extends Day {
public function run() {
$input = $this->getInputFile('day_3_input.txt');
return [
'part_1' => 'tes',
'part_2' => 'hello',
];
}
}

View File

@ -34,8 +34,8 @@
<h2 class="bitcount fs-1">Day 3</h2>
</div>
<div class="card-body">
<p class="bold">Part 1:</p>
<p class="bold">Part 2:</p>
<p class="bold">Part 1: {{ day_3_answer }}</p>
<p class="bold">Part 2: {{ day_3_answer_2 }}</p>
<button>View Code</button>
</div>
</div>