1
0

Update things

This commit is contained in:
2021-12-01 19:32:38 +01:00
parent ccfcf5a259
commit 322f8eb45a
53 changed files with 156 additions and 239 deletions
+2 -5
View File
@@ -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) }