package com.github.rnelson.adventofcode

import java.nio.file.Files
import java.nio.file.Paths

abstract class Day {
    protected val input: ArrayList<String> = ArrayList()

    fun setup(dayNumber: String) {
        val stream = Files.newInputStream(Paths.get("input/day${dayNumber}.txt"))
        stream.buffered().reader().use { reader ->
            input.add(reader.readText())
        }
    }

    abstract fun solveA(): String
    abstract fun solveB(): String
}
package com.github.rnelson.adventofcode

import java.io.File

abstract class Day {
    protected val input: ArrayList<String> = ArrayList()

    fun setup(dayNumber: String) {
        File("input/day$dayNumber.txt").forEachLine { input.add(it) }
    }

    abstract fun solveA(): String
    abstract fun solveB(): String
}
Fix file -> ArrayList logic
Fix file -> ArrayList logic

rnelson/adventofcode,rnelson/adventofcode,rnelson/adventofcode,rnelson/adventofcode