// // Array+Rotation.swift // TetrisKit // // Created by Shadowfacts on 10/13/19. // Copyright © 2019 Shadowfacts. All rights reserved. // import Foundation extension Array where Element: RandomAccessCollection, Element: MutableCollection, Element.Index == Int { mutating func rotateClockwise() { guard allSatisfy({ $0.count == self.count }) else { return } let layerCount = self.count / 2 for layer in 0..