From a756de70f8fab07d26ccc3793acbae46dae21a3b Mon Sep 17 00:00:00 2001 From: Travis Hardiman Date: Wed, 4 Dec 2024 08:36:23 -0500 Subject: [PATCH] day 4, done --- README.md | 2 +- public/funs.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3012d89..f7d19a0 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ my 2024 solutions on ~~glitch: [meowing-holy-carbon](https://meowing-holy-carbon also on github: [dieseltravis/aoc2024](https://github.com/dieseltravis/aoc2024) -[![Days completed in a row](https://img.shields.io/badge/⭐%20days%20in%20a%20row-3-blueviolet)](https://adventofcode.com/2024/) [![Node.js CI](https://github.com/dieseltravis/aoc2024/actions/workflows/node.js.yml/badge.svg)](https://github.com/dieseltravis/aoc2024/actions/workflows/node.js.yml) [![js-semistandard-style](https://img.shields.io/badge/code%20style-semistandard-brightgreen.svg?logo=javascript)](https://github.com/standard/semistandard) +[![Days completed in a row](https://img.shields.io/badge/⭐%20days%20in%20a%20row-4-blueviolet)](https://adventofcode.com/2024/) [![Node.js CI](https://github.com/dieseltravis/aoc2024/actions/workflows/node.js.yml/badge.svg)](https://github.com/dieseltravis/aoc2024/actions/workflows/node.js.yml) [![js-semistandard-style](https://img.shields.io/badge/code%20style-semistandard-brightgreen.svg?logo=javascript)](https://github.com/standard/semistandard) ## solutions: Install node `>18.18.x`, `yarn`, run `yarn install`, and then `yarn start`. diff --git a/public/funs.js b/public/funs.js index 8a35ab5..370504d 100644 --- a/public/funs.js +++ b/public/funs.js @@ -181,7 +181,7 @@ const left = (x >= len - 1); const right = (x + len - 1 < xmax); console.log('up:' + up + ', down:' + down + ', left:' + left + ', right:' + right); - // look in all possible directions + // look in all possible directions if (up) { // look up if (input[y - 1][x] === xmas[1] && input[y - 2][x] === xmas[2] && input[y - 3][x] === xmas[3]) {