Skip to content

tloist/aoc2020

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This repository holds my solution (attempts) to the advent of code challenges. I am trying to solve them with Scala 3 / Dotty just to get some practise in Scala and especially Dotty again. Maybe throwing in some Cats without claiming expertise in these topics, but judge yourself…

Directory structure

The code for the tasks for each day can be found in the directory days, where each day is its own folder named after the day and contains a subproject for that day. Each day expects its input under src/main/resources/input[AB].txt or just …/inputA.txt if the input is the same for both. So this is what you should expect

days/
├── 01
│   ├── src
│   │   ├── main
│   │   │   ├── scala
│   │   │   │   └── Part1.scala
│   │   │   └── resources
│   │   │       ├── inputA.txt
│   │   │       └── inputB.txt
│   │   │   ssh
│   │   └── test
│   │       └── scala
│   │           └── … potential some unit tests …
│   ├── 02
        …

with some common code under days/common and potential additional common code if some days share some code.

SBT

You can list all the available days with

projects
[info] In file:~/AdventOfCode/2020/
[info]     common
[info]     day_01
[info]   * root-2020

which will show you all the projects. To execute them, you can enter

day_01/runMain Part1

because I will try to stick to convention to name the objects containing the main class Part1 and Part2. If the input is available, that they are likely going to need (and I didn't make a mistake that I also commited) that should work.

About

Advent of Code 2020 - Fun with Dotty

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages