advent of code 2023 day 10: assume dot is never in our path
This commit is contained in:
parent
b4ee1f50b4
commit
14bee85b0c
|
@ -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'
|
||||
|
|
Loading…
Reference in New Issue