Skip to content

Commit

Permalink
Fix Unused Variables, and Days not Printing
Browse files Browse the repository at this point in the history
  • Loading branch information
GeistInDerSH committed Oct 20, 2024
1 parent 07e9ee3 commit 75843d7
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 5 deletions.
3 changes: 1 addition & 2 deletions src/main/kotlin/com/geistindersh/aoc/year2022/Day10.kt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ class Day10(dataFile: DataFile) {
xRegister += instruction.second
}

println(cycle)
return signals
}

Expand Down Expand Up @@ -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())
}
2 changes: 2 additions & 0 deletions src/main/kotlin/com/geistindersh/aoc/year2022/Day11.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -127,4 +128,5 @@ class Day11(dataFile: DataFile) {

fun day11() {
val day = Day11(DataFile.Part1)
report(2022, 11, day.part1(), day.part2())
}
2 changes: 2 additions & 0 deletions src/main/kotlin/com/geistindersh/aoc/year2022/Day12.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -101,4 +102,5 @@ class Day12(dataFile: DataFile) {

fun day12() {
val day = Day12(DataFile.Part1)
report(2022, 12, day.part1(), day.part2())
}
2 changes: 2 additions & 0 deletions src/main/kotlin/com/geistindersh/aoc/year2022/Day13.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -119,4 +120,5 @@ class Day13(dataFile: DataFile) {

fun day13() {
val day = Day13(DataFile.Part1)
report(2022, 13, day.part1(), day.part2())
}
2 changes: 2 additions & 0 deletions src/main/kotlin/com/geistindersh/aoc/year2022/Day14.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -96,4 +97,5 @@ class Day14(dataFile: DataFile) {

fun day14() {
val day = Day14(DataFile.Part1)
report(2022, 14, day.part1(), day.part2())
}
2 changes: 1 addition & 1 deletion src/main/kotlin/com/geistindersh/aoc/year2022/Day3.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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())
}
3 changes: 2 additions & 1 deletion src/main/kotlin/com/geistindersh/aoc/year2022/Day8.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -73,5 +74,5 @@ class Day8(dataFile: DataFile) {

fun day8() {
val day = Day8(DataFile.Part1)

report(2022, 8, day.part1(), day.part2())
}
4 changes: 3 additions & 1 deletion src/main/kotlin/com/geistindersh/aoc/year2022/Day9.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -86,5 +87,6 @@ class Day9(dataFile: DataFile) {
}

fun day9() {

val day = Day9(DataFile.Part1)
report(2022, 9, day.part1(), day.part2())
}

0 comments on commit 75843d7

Please sign in to comment.