# Advent of Code 2021 In this repository, you'll find my solutions. [![CI](https://github.com/trizz/adventofcode21/actions/workflows/ci.yaml/badge.svg)](https://github.com/trizz/adventofcode21/actions/workflows/ci.yaml) ## 🛠 Setup and running - Run `composer install` to install the dependencies. - Run `./aoc21 {day}` to run the solution for a specific day (for example `./aoc21 1` to run the code for day 1) - Run `./aoc21 puzzle {day}` to get the description of the puzzle for the specific day. - Run `composer test` to automatically validate the solutions. ## 🧩 Add a new puzzle/solution - Create a directory in `./data` with the correct name. - Create `example.txt` with the example values from the puzzle. - Create `data.txt` with your personal input. - Create `puzzle.md` with the puzzle. You can use [this plugin](https://github.com/kfarnung/aoc-to-markdown) to easily convert the puzzle to markdown. - Create a new class in the `src` directory and make sure it has the structure defined below. - Add this class to the `./aoc21` file, and you can run it. - Add a new test in `./tests` with structure defined below. - Run `composer test` to run all the tests.
Solution command structure ```php
Solution test structure ```php