Skip to content

Awlexus/aoc2020

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

My take on this years Advent of Code

Setup

Create the directories input and test_input.

mkdir input/ test_input/

Place your personal puzzle inputs input and the example input into test_input, using the following naming convention.

d#{day}.txt

How to use this

You can find a template file in lib/template.ex. Just copy this file and append the day of month to the module.

defmodule D1 do
  @behaviour Solution

  ...
end

The functions test_result and test_result2 should return the example solution for the respective parts. The functions solve and solve2 should try to solve their respective part.

Solving

The module Solution comes with the functions try1 and try2. They accept a module and solve part one or 2 respectively.

iex> Solution.try1 D1
Running part one...
Test input:

1721
979
366
299
675
1456

Test was successful.
Solution: <redacted>

:ok

GLHF!

About

Advent of code is fun. Hope this helps you start the solving :)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages