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 {
|
||||
if energy > 9 && !flashers[coord] {
|
||||
complete = false
|
||||
flashers[coord] = true
|
||||
answer++
|
||||
for _, neighbor := range coord.Neighbours(width, height, true) {
|
||||
octopuses[neighbor]++
|
||||
for _, neighbour := range coord.Neighbours(width, height, true) {
|
||||
octopuses[neighbour]++
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user