Skip to content

Commit

Permalink
🧀🛹 Updated with Glitch: day 16, part 2 display progress
Browse files Browse the repository at this point in the history
  • Loading branch information
Glitch (branch-three-oviraptor) committed Dec 16, 2023
1 parent f957081 commit 87bd422
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion public/funs.js
Original file line number Diff line number Diff line change
Expand Up @@ -1631,7 +1631,9 @@
}
console.log(input, ymax, xmax, starters);
let max = 0;
starters.forEach(start => {
// progress
const startLen = starters.length;
starters.forEach((start, i) => {
const tileDirs = {};
tileDirs[start.y + ',' + start.x + ',' + start.dy + ',' + start.dx] = 1;
const tiles = {};
Expand Down Expand Up @@ -1670,6 +1672,7 @@
lastDirs = dirs;
}
max = Math.max(lastEnergy, max);
console.log((i + 1) + ' of ' + startLen + ' ' + (new Date()).toISOString(), max);
});
console.log(max);
return max;
Expand Down

0 comments on commit 87bd422

Please sign in to comment.