Repository with solutions for Advent of Code 2022.
Santa's reindeer typically eat regular reindeer food, but they need a lot of magical energy to deliver presents on Christmas. For that, their favorite snack is a special type of ⭐ fruit that only grows deep in the jungle. The Elves have brought you on their annual expedition to the grove where the fruit grows.
To supply enough magical energy, the expedition needs to retrieve a minimum of fifty ⭐s by December 25th. Although the Elves assure you that the grove has plenty of fruit, you decide to grab any fruit you see along the way, just in case.
Collect ⭐s by solving puzzles. Two puzzles will be made available on each day in the Advent calendar; the second puzzle is unlocked when you complete the first. Each puzzle grants one ⭐.
⭐ ⭐ ⭐ ⭐ ⭐ ⭐ ⭐ ⭐ ⭐ ⭐ ⭐ ⭐ ⭐ ⭐ ⭐ ⭐ ⭐ ⭐ ⭐ ⭐ ⭐ ⭐ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★
Day | Task details | Collected ⭐s | Benchmark results |
---|---|---|---|
01 | Calorie Counting | ⭐ ⭐ | Benchmarks |
02 | Rock Paper Scissors | ⭐ ⭐ | Benchmarks |
03 | Rucksack Reorganization | ⭐ ⭐ | Benchmarks |
04 | Camp Cleanup | ⭐ ⭐ | Benchmarks |
05 | Supply Stacks | ⭐ ⭐ | Benchmarks |
06 | Tuning Trouble | ⭐ ⭐ | Benchmarks |
07 | No Space Left On Device | ⭐ ⭐ | Benchmarks |
08 | Treetop Tree House | ⭐ ⭐ | Benchmarks |
09 | Rope Bridge | ⭐ ⭐ | Benchmarks |
10 | Cathode-Ray Tube | ⭐ ⭐ | Benchmarks |
11 | Monkey in the Middle | ⭐ ⭐ | Benchmarks |
- Every task has a dedicated .NET 7.0 project in the
src
directory. - There is a special project
Runner
(Console application) to run any daily tasks or benchmarks. - For every project with daily tasks in the
src
directory there is a dedicated test project in thetests/unit
andtest/benchmarks
folders. - Every project name is based on the day in the calendar, ex.
DayOne
,DayTwo
, etc. - Name of every unit tests project is based on the tasks project name with the
.Tests.Unit
suffix. - Name of every benchmark test project is based on the tasks project name with the
.Tests.Benchmarks
suffix.
📂 AdventOfCode/
|
├─ 📕 deps/
| Utils and helpers libraries
|
├─ 📓 docs/
│ ├─ 🖼️ assets/
| | Static content like pictures for documentation
│ ├─ 📈 results/
| | Benchmarks results
│ └─ ☑️ tasks/
| Tasks descriptions
|
├─ 📘 src/
│ ├─ ⚙️ Runner/
│ └─ ✅ Day<Number>/
| |- Project files
| └- day-<day_number>.inputdata
|
└─ 📗 tests/
├─ 🚀 benchmarks/
| └─ ⚙️ Day<Number>.Tests.Benchmarks/
└─ 🧪 unit/
└─ ⚙️ Day<Number>.Tests.Unit/
|- Project files
└- day-<day_number>.testdata
Go to .NET download page and download the latest 7.0 version.
cd src/Runner
dotnet run
cd src/Runner
dotnet run -- run-tasks -d <day_number>
dotnet test
cd src/Runner
dotnet run -c Release -- run-benchmark -d <day_number>
Check out my colleagues repositories, who are also taking part in this year AoC.
- Lidjan (TypeScript)
Authored completely by Mateusz Bryll