1
1
# Scala Advent of Code 2021
2
2
3
- Scala Center's solutions of [ Advent of Code] ( https://adventofcode.com/ ) .
3
+ Solutions in Scala for the annual [ Advent of Code] ( https://adventofcode.com/ ) challenge. _ Note: this repo is not affiliated with Advent of Code. _
4
4
5
5
## Website
6
6
7
7
The [ Scala Advent of Code] ( https://scalacenter.github.io/scala-advent-of-code/ ) website contains:
8
- - some explanation of our solutions
8
+ - some explanation of our solutions to [ Advent of Code (adventofcode.com) ] ( https://adventofcode.com/ )
9
9
- more solutions from the community
10
10
11
11
## Setup
@@ -20,14 +20,17 @@ After you clone the repository, open a terminal and run:
20
20
```
21
21
$ cd scala-advent-of-code/2021
22
22
$ scala-cli setup-ide src
23
+ $ mkdir input
23
24
$ code .
24
25
```
25
26
26
27
` code . ` will open Visual Studio Code and start Metals.
27
28
28
29
### How to run a solution
29
30
30
- In a terminal you can run:
31
+ First copy your input to the folder ` scala-advent-of-code/2021/input ` .
32
+
33
+ Next, in a terminal you can run:
31
34
```
32
35
$ cd scala-advent-of-code/2021
33
36
$ scala-cli . -M day1.part1
@@ -36,6 +39,8 @@ Compiled project (Scala 3.x.y, JVM)
36
39
The solution is 1559
37
40
```
38
41
42
+ The result will likely be different for you, as inputs are different for each user.
43
+
39
44
Or, to run another solution:
40
45
```
41
46
$ scala-cli . -M <dayX>.<partX>
@@ -52,3 +57,6 @@ You can run it locally, if you have [Node.js](https://nodejs.org/en/) installed,
52
57
```
53
58
$ scala-cli . --js -M day3.part1
54
59
```
60
+
61
+ ## Contributing
62
+ - Please do not commit your puzzle inputs, we can not accept them as they are protected by copyright
0 commit comments