Update things
This commit is contained in:
@@ -5,16 +5,13 @@ import be.vandewalleh.aoc.days.geometry.gridOf
|
||||
import be.vandewalleh.aoc.days.geometry.transformations
|
||||
import be.vandewalleh.aoc.utils.input.Day
|
||||
import be.vandewalleh.aoc.utils.input.Groups
|
||||
import be.vandewalleh.aoc.utils.input.Input
|
||||
import java.util.*
|
||||
import kotlin.collections.ArrayList
|
||||
import kotlin.math.sqrt
|
||||
|
||||
private typealias Tile = Grid<Char>
|
||||
|
||||
@Day(20)
|
||||
class Day20(@Groups val input: Input<List<List<String>>>) {
|
||||
private val tiles: Map<Int, Tile> = input.value
|
||||
class Day20(@Groups val input: List<List<String>>) {
|
||||
private val tiles: Map<Int, Tile> = input
|
||||
.map { it[0].let { it.substring(5 until it.indexOf(':')).toInt() } to it.drop(1) }
|
||||
.associate { (id, tile) -> id to gridOf(tile) }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user