mirror of
https://github.com/seigler/advent-of-code-2020
synced 2025-07-27 00:06:09 +00:00
Day 11, part one
This commit is contained in:
parent
b30ee5006b
commit
d94ca60a36
1 changed files with 2 additions and 2 deletions
|
@ -45,7 +45,7 @@ function step (input) {
|
||||||
return next
|
return next
|
||||||
}
|
}
|
||||||
|
|
||||||
function stabilize(input) {
|
function stabilize (input) {
|
||||||
// console.log('\nInput\n--------')
|
// console.log('\nInput\n--------')
|
||||||
// draw(input)
|
// draw(input)
|
||||||
let rounds = 1; let old; let fresh = input
|
let rounds = 1; let old; let fresh = input
|
||||||
|
@ -61,7 +61,7 @@ function stabilize(input) {
|
||||||
|
|
||||||
async function solveForFirstStar (input) {
|
async function solveForFirstStar (input) {
|
||||||
const stable = stabilize(input)
|
const stable = stabilize(input)
|
||||||
const filledSeats = stable.flat(2).filter(x => x=='#').length
|
const filledSeats = stable.flat(2).filter(x => x == '#').length
|
||||||
report('Solution 1:', filledSeats)
|
report('Solution 1:', filledSeats)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue