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
+3 -4
View File
@@ -1,12 +1,11 @@
package be.vandewalleh.aoc.days
import be.vandewalleh.aoc.utils.input.Day
import be.vandewalleh.aoc.utils.input.Input
import be.vandewalleh.aoc.utils.input.Lines
import kotlin.math.abs
@Day(12)
class Day12(@Lines val input: Input<List<String>>) {
class Day12(@Lines val input: List<String>) {
fun part1(): Int {
var x = 0
@@ -15,7 +14,7 @@ class Day12(@Lines val input: Input<List<String>>) {
val dirs = listOf("N", "E", "S", "W")
input.value.forEach {
input.forEach {
val dir = it.take(1)
val steps = it.drop(1).toInt()
@@ -49,7 +48,7 @@ class Day12(@Lines val input: Input<List<String>>) {
var waypointX = 10
var waypointY = -1
input.value.forEach {
input.forEach {
val dir = it.take(1)
val steps = it.drop(1).toInt()