@main struct Day11: Puzzle { mutating func run() { var count = 0 var currentStep = 0 repeat { let stepCount = step() count += stepCount currentStep += 1 if (currentStep == 100) { print("Part 1:", count) } if stepCount == width * height { print("Part 2:", currentStep) break } } while true } subscript(x: Int, y: Int) -> Int { get { data[x + width * y] } set { data[x + width * y] = newValue } } mutating func step() -> Int { var flashes: Set = [] func up(x: Int, y: Int) { self[x, y] += 1 if self[x, y] > 9, flashes.insert(Point(x: x, y: y)).inserted { for i in -1...1 where 0..