From a36d0efd4b6549eef750ebb6ab19708654eefbd8 Mon Sep 17 00:00:00 2001 From: Logiar Date: Thu, 5 Dec 2024 15:11:22 +0100 Subject: [PATCH] Bit of debugging2 --- day04.kts | 1 + day04.kts.testvalue | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/day04.kts b/day04.kts index 21520ae..796c378 100755 --- a/day04.kts +++ b/day04.kts @@ -39,6 +39,7 @@ fun findXmas(y: Int, x: Int): Int { for (searchOffset in xMasSearchOffsets) { val last = searchOffset.last() if ((y+last.first) !in ycoordinates.indices || (x+last.second) !in ycoordinates[y].indices){ + if (x == 1 && y == 139) println("skipping x: (${x+last.second}, y: ${y+last.first})") continue } var match = true diff --git a/day04.kts.testvalue b/day04.kts.testvalue index 1fc4942..7012292 100644 --- a/day04.kts.testvalue +++ b/day04.kts.testvalue @@ -3772,6 +3772,11 @@ x: 131, y: 138 x: 136, y: 138 x: 139, y: 138 x: 1, y: 139 +skipping x: (1, y: 142) +skipping x: (-2, y: 139) +skipping x: (4, y: 142) +skipping x: (-2, y: 136) +skipping x: (-2, y: 142) x: 11, y: 139 x: 20, y: 139 x: 23, y: 139