day 11a complete
missing bool value meant the flash updates stopped early
This commit is contained in:
parent
37174b18db
commit
79461b82c2
@ -38,10 +38,11 @@ func main() {
|
|||||||
|
|
||||||
for coord, energy := range octopuses {
|
for coord, energy := range octopuses {
|
||||||
if energy > 9 && !flashers[coord] {
|
if energy > 9 && !flashers[coord] {
|
||||||
|
complete = false
|
||||||
flashers[coord] = true
|
flashers[coord] = true
|
||||||
answer++
|
answer++
|
||||||
for _, neighbor := range coord.Neighbours(width, height, true) {
|
for _, neighbour := range coord.Neighbours(width, height, true) {
|
||||||
octopuses[neighbor]++
|
octopuses[neighbour]++
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user