Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
shahata committed Dec 14, 2023
1 parent d2c78d3 commit 61c76a1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/2023/day14.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
function vertical(lines, add = 1) {
function vertical(lines, add) {
for (let x = 0; x < lines[0].length; x++) {
let target = add > 0 ? 0 : lines.length - 1;
for (let y = target; y >= 0 && y < lines.length; y += add) {
Expand All @@ -12,7 +12,7 @@ function vertical(lines, add = 1) {
}
}

function horizontal(lines, add = 1) {
function horizontal(lines, add) {
for (let y = 0; y < lines.length; y++) {
let target = add > 0 ? 0 : lines[0].length - 1;
for (let x = target; x >= 0 && x < lines[0].length; x += add) {
Expand Down

0 comments on commit 61c76a1

Please sign in to comment.