advent of code 2023 day 10: assume dot is never in our path

This commit is contained in:
Wouter Groeneveld 2023-12-10 14:53:29 +01:00
parent b4ee1f50b4
commit 14bee85b0c
1 changed files with 1 additions and 2 deletions

View File

@ -14,8 +14,7 @@ module.exports.solve = function(input) {
'L': [[-1, 0], [0, 1]],
'J': [[-1, 0], [0, -1]],
'7': [[1, 0], [0, -1]],
'F': [[1, 0], [0, 1]],
'.': []
'F': [[1, 0], [0, 1]]
}
const withinBounds = (coord) => coord.every(c => c >= 0 && c < mapsize)
const notYetVisited = (coord) => pipes[coord[0]][coord[1]] !== 'X'