From c1179a2f110d51b476508e1f9f98b8123dfa5cdd Mon Sep 17 00:00:00 2001 From: Logiar Date: Thu, 5 Dec 2024 15:22:40 +0100 Subject: [PATCH] Revert stuff to see if input is fixed. --- day02.kts | 3 --- day04.kts | 3 --- 2 files changed, 6 deletions(-) diff --git a/day02.kts b/day02.kts index e1777d0..a8ae109 100755 --- a/day02.kts +++ b/day02.kts @@ -8,9 +8,6 @@ var safelines = 0 var dampenedsafelines = 0 while (scanner.hasNextLine()) { val line = scanner.nextLine() - if (line.isEmpty()) { - continue - } val numbers = line.split(" ").map { it.toInt() } if (isSafe(numbers)) { safelines++ diff --git a/day04.kts b/day04.kts index 3045731..8de2ece 100755 --- a/day04.kts +++ b/day04.kts @@ -17,9 +17,6 @@ val xMasSearchOffsets = listOf( var ycoordinates = mutableListOf>() while (scanner.hasNextLine()) { val line = scanner.nextLine() - if (line.isEmpty()) { - continue - } val xcoordinates = line.split("").filter { it.isNotEmpty() } ycoordinates.add(xcoordinates) }