From 5f4440aae3fe4a19a265ce8b4269ba01c2c9b529 Mon Sep 17 00:00:00 2001 From: Logiar Date: Mon, 2 Dec 2024 14:06:27 +0100 Subject: [PATCH] Mistakenly didn't add files? --- .github/workflows/solve.yaml | 10 ++++++---- day01.kts | 2 +- day02.kts | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/solve.yaml b/.github/workflows/solve.yaml index 4b67919..4e89550 100644 --- a/.github/workflows/solve.yaml +++ b/.github/workflows/solve.yaml @@ -15,7 +15,9 @@ jobs: distribution: 'corretto' # See 'Supported distributions' for available options java-version: '21' - uses: https://github.com/fwilhe2/setup-kotlin@main - - name: Day 1 - run: kotlin puzzle1.kts - - name: Day 2 - run: kotlin puzzle2.kts + - name: Solutions + run: | + for script in $(ls *.kts | sort); do + echo "Running $script" + kotlin $script + done \ No newline at end of file diff --git a/day01.kts b/day01.kts index 6e1f524..7cc4c52 100644 --- a/day01.kts +++ b/day01.kts @@ -2,7 +2,7 @@ import java.io.File import java.util.Scanner import kotlin.math.abs -val scanner = Scanner(File("puzzle1input.txt")) +val scanner = Scanner(File("day01input.txt")) val firstList = mutableListOf() val secondList = mutableListOf() var secondMap = mutableMapOf() diff --git a/day02.kts b/day02.kts index c3c1368..9be594e 100644 --- a/day02.kts +++ b/day02.kts @@ -3,7 +3,7 @@ import java.util.Scanner import javax.print.attribute.standard.NumberUpSupported import kotlin.math.abs -val scanner = Scanner(File("puzzle2input.txt")) +val scanner = Scanner(File("day02input.txt")) var safelines = 0 var dampenedsafelines = 0 while (scanner.hasNextLine()) {