From 75843d71125802ad59ff4531fb6ff0464d55e9c1 Mon Sep 17 00:00:00 2001 From: Matthew Hill Date: Sat, 19 Oct 2024 23:00:08 -0700 Subject: [PATCH] Fix Unused Variables, and Days not Printing --- src/main/kotlin/com/geistindersh/aoc/year2022/Day10.kt | 3 +-- src/main/kotlin/com/geistindersh/aoc/year2022/Day11.kt | 2 ++ src/main/kotlin/com/geistindersh/aoc/year2022/Day12.kt | 2 ++ src/main/kotlin/com/geistindersh/aoc/year2022/Day13.kt | 2 ++ src/main/kotlin/com/geistindersh/aoc/year2022/Day14.kt | 2 ++ src/main/kotlin/com/geistindersh/aoc/year2022/Day3.kt | 2 +- src/main/kotlin/com/geistindersh/aoc/year2022/Day8.kt | 3 ++- src/main/kotlin/com/geistindersh/aoc/year2022/Day9.kt | 4 +++- 8 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/main/kotlin/com/geistindersh/aoc/year2022/Day10.kt b/src/main/kotlin/com/geistindersh/aoc/year2022/Day10.kt index d4c59c8..2220759 100644 --- a/src/main/kotlin/com/geistindersh/aoc/year2022/Day10.kt +++ b/src/main/kotlin/com/geistindersh/aoc/year2022/Day10.kt @@ -35,7 +35,6 @@ class Day10(dataFile: DataFile) { xRegister += instruction.second } - println(cycle) return signals } @@ -75,5 +74,5 @@ class Day10(dataFile: DataFile) { fun day10() { val day = Day10(DataFile.Part1) - report(2022, 10, 0, 0) + report(2022, 10, day.part1(), day.part2()) } \ No newline at end of file diff --git a/src/main/kotlin/com/geistindersh/aoc/year2022/Day11.kt b/src/main/kotlin/com/geistindersh/aoc/year2022/Day11.kt index 79fba58..71bb5be 100644 --- a/src/main/kotlin/com/geistindersh/aoc/year2022/Day11.kt +++ b/src/main/kotlin/com/geistindersh/aoc/year2022/Day11.kt @@ -2,6 +2,7 @@ package com.geistindersh.aoc.year2022 import com.geistindersh.aoc.helper.files.DataFile import com.geistindersh.aoc.helper.files.fileToString +import com.geistindersh.aoc.helper.report import java.math.BigInteger class Day11(dataFile: DataFile) { @@ -127,4 +128,5 @@ class Day11(dataFile: DataFile) { fun day11() { val day = Day11(DataFile.Part1) + report(2022, 11, day.part1(), day.part2()) } \ No newline at end of file diff --git a/src/main/kotlin/com/geistindersh/aoc/year2022/Day12.kt b/src/main/kotlin/com/geistindersh/aoc/year2022/Day12.kt index 2b8ba59..7676867 100644 --- a/src/main/kotlin/com/geistindersh/aoc/year2022/Day12.kt +++ b/src/main/kotlin/com/geistindersh/aoc/year2022/Day12.kt @@ -2,6 +2,7 @@ package com.geistindersh.aoc.year2022 import com.geistindersh.aoc.helper.files.DataFile import com.geistindersh.aoc.helper.files.fileToStream +import com.geistindersh.aoc.helper.report import java.util.* class Day12(dataFile: DataFile) { @@ -101,4 +102,5 @@ class Day12(dataFile: DataFile) { fun day12() { val day = Day12(DataFile.Part1) + report(2022, 12, day.part1(), day.part2()) } \ No newline at end of file diff --git a/src/main/kotlin/com/geistindersh/aoc/year2022/Day13.kt b/src/main/kotlin/com/geistindersh/aoc/year2022/Day13.kt index e7f9393..a0fbe1b 100644 --- a/src/main/kotlin/com/geistindersh/aoc/year2022/Day13.kt +++ b/src/main/kotlin/com/geistindersh/aoc/year2022/Day13.kt @@ -2,6 +2,7 @@ package com.geistindersh.aoc.year2022 import com.geistindersh.aoc.helper.files.DataFile import com.geistindersh.aoc.helper.files.fileToStream +import com.geistindersh.aoc.helper.report import java.util.* class Day13(dataFile: DataFile) { @@ -119,4 +120,5 @@ class Day13(dataFile: DataFile) { fun day13() { val day = Day13(DataFile.Part1) + report(2022, 13, day.part1(), day.part2()) } \ No newline at end of file diff --git a/src/main/kotlin/com/geistindersh/aoc/year2022/Day14.kt b/src/main/kotlin/com/geistindersh/aoc/year2022/Day14.kt index a15b0be..dbd2ae4 100644 --- a/src/main/kotlin/com/geistindersh/aoc/year2022/Day14.kt +++ b/src/main/kotlin/com/geistindersh/aoc/year2022/Day14.kt @@ -3,6 +3,7 @@ package com.geistindersh.aoc.year2022 import com.geistindersh.aoc.helper.files.DataFile import com.geistindersh.aoc.helper.files.fileToStream import com.geistindersh.aoc.helper.iterators.takeWhileInclusive +import com.geistindersh.aoc.helper.report class Day14(dataFile: DataFile) { private val data = fileToStream(2022, 14, dataFile) @@ -96,4 +97,5 @@ class Day14(dataFile: DataFile) { fun day14() { val day = Day14(DataFile.Part1) + report(2022, 14, day.part1(), day.part2()) } \ No newline at end of file diff --git a/src/main/kotlin/com/geistindersh/aoc/year2022/Day3.kt b/src/main/kotlin/com/geistindersh/aoc/year2022/Day3.kt index 22fe09d..1043df9 100644 --- a/src/main/kotlin/com/geistindersh/aoc/year2022/Day3.kt +++ b/src/main/kotlin/com/geistindersh/aoc/year2022/Day3.kt @@ -35,5 +35,5 @@ class Day3(dataFile: DataFile) { fun day3() { val day = Day3(DataFile.Part1) - report(2022, 3, 0, 0) + report(2022, 3, day.part1(), day.part2()) } \ No newline at end of file diff --git a/src/main/kotlin/com/geistindersh/aoc/year2022/Day8.kt b/src/main/kotlin/com/geistindersh/aoc/year2022/Day8.kt index 8831b73..4f62cc0 100644 --- a/src/main/kotlin/com/geistindersh/aoc/year2022/Day8.kt +++ b/src/main/kotlin/com/geistindersh/aoc/year2022/Day8.kt @@ -3,6 +3,7 @@ package com.geistindersh.aoc.year2022 import com.geistindersh.aoc.helper.files.DataFile import com.geistindersh.aoc.helper.files.fileToStream import com.geistindersh.aoc.helper.iterators.takeWhileInclusive +import com.geistindersh.aoc.helper.report class Day8(dataFile: DataFile) { private val rowMajor = fileToStream(2022, 8, dataFile) @@ -73,5 +74,5 @@ class Day8(dataFile: DataFile) { fun day8() { val day = Day8(DataFile.Part1) - + report(2022, 8, day.part1(), day.part2()) } \ No newline at end of file diff --git a/src/main/kotlin/com/geistindersh/aoc/year2022/Day9.kt b/src/main/kotlin/com/geistindersh/aoc/year2022/Day9.kt index eef642b..21b7831 100644 --- a/src/main/kotlin/com/geistindersh/aoc/year2022/Day9.kt +++ b/src/main/kotlin/com/geistindersh/aoc/year2022/Day9.kt @@ -2,6 +2,7 @@ package com.geistindersh.aoc.year2022 import com.geistindersh.aoc.helper.files.DataFile import com.geistindersh.aoc.helper.files.fileToStream +import com.geistindersh.aoc.helper.report import kotlin.math.absoluteValue class Day9(dataFile: DataFile) { @@ -86,5 +87,6 @@ class Day9(dataFile: DataFile) { } fun day9() { - + val day = Day9(DataFile.Part1) + report(2022, 9, day.part1(), day.part2()) } \ No newline at end of file