day 11a complete
missing bool value meant the flash updates stopped early
This commit is contained in:
		@@ -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]++
 | 
			
		||||
					}
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user