1
0
Fork 0

docs: updates to readme; fix: gen.solution type error

This commit is contained in:
Sloane Perrault 2022-09-21 09:19:53 -04:00
parent f770a143eb
commit 42a3de4f5e
2 changed files with 19 additions and 2 deletions

View file

@ -3,7 +3,7 @@
<details> <details>
<summary>Setup</summary> <summary>Setup</summary>
Using [asdf]: Using [asdf](https://asdf-vm.com/#/):
```sh ```sh
asdf plugin add erlang asdf plugin add erlang
@ -19,4 +19,20 @@
| 12 | 13 | 14 | 15 | 16 | 17 | 18 | | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
| 19 | 20 | 21 | 22 | 23 | 24 | 25 | | 19 | 20 | 21 | 22 | 23 | 24 | 25 |
[asdf]: https://asdf-vm.com/#/ ---
## Mix Tasks
- `advent_of_code.gen.solution`
- `advent_of_code.solve`
- `advent_of_code.fetch_input`
Run `mix help <task>` for details.
## [`AdventOfCode.PuzzleSolver`](./lib/advent_of_code/puzzle_solver.ex)
A behaviour for a solution to a puzzle. Must define a `solve/2` callback.
## [`AdventOfCode.PuzzleCase`](./test/support/puzzle_case.ex)
Case template defining an `assert_solution/2` helper.

View file

@ -33,6 +33,7 @@ defmodule Mix.Tasks.AdventOfCode.Gen.Solution do
create_file(day_file, day_contents) create_file(day_file, day_contents)
for part <- 1..2 do for part <- 1..2 do
part = to_string(part)
part_module = part_module(day, part) part_module = part_module(day, part)
part_contents = part_contents =