Skip to content

mateusz-bryll/AdventOfCode2022

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎄 Advent of Code 2022 (C#) 🎅

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 ⭐.

🦌🦌 My progress 🦌🦌

⭐ ⭐ ⭐ ⭐ ⭐ ⭐ ⭐ ⭐ ⭐ ⭐ ⭐ ⭐ ⭐ ⭐ ⭐ ⭐ ⭐ ⭐ ⭐ ⭐ ⭐ ⭐ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★ ★

Calendar

✔️ Tasks

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

📂 Structure

  • 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 the tests/unit and test/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

🛠 Usage

Install .NET Core

Go to .NET download page and download the latest 7.0 version.

Run all tasks

cd src/Runner
dotnet run

Run tasks from day

cd src/Runner
dotnet run -- run-tasks -d <day_number>

Run tests

dotnet test

Run benchmarks

cd src/Runner
dotnet run -c Release -- run-benchmark -d <day_number>

📜 Wants more?

Check out my colleagues repositories, who are also taking part in this year AoC.

🧙 Author

Authored completely by Mateusz Bryll

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages