Skip to content

Commit

Permalink
feat(2023): update solution for challenge #19
Browse files Browse the repository at this point in the history
  • Loading branch information
iswilljr committed Dec 19, 2023
1 parent 8039b53 commit 7af0a05
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions 2023/challenge-19/challenge-19.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ export function revealSabotage(store: string[][]) {
const prevRow = store[i - 1]

const adjacentCells = [
prevRow[j - 1],
prevRow[j],
prevRow[j + 1],
prevRow?.[j - 1],
prevRow?.[j],
prevRow?.[j + 1],
row[j - 1],
row[j + 1],
nextRow[j - 1],
nextRow[j],
nextRow[j + 1],
nextRow?.[j - 1],
nextRow?.[j],
nextRow?.[j + 1],
]

const count = adjacentCells.reduce(
Expand Down

0 comments on commit 7af0a05

Please sign in to comment.