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