// // ZShape.swift // Privyet // // Created by Amy Bowersox on 5/24/20. // Copyright © 2020 Erbosoft Metaverse Design Solutions. All rights reserved. // import Foundation class ZShape: Shape { /* Orientations 0 and 180: | * | 0 | | 2 | 1 | | 3 | | Orientations 90 and 270: | 0*| 1 | | | | 2 | 3 | * marks the row/column indicator for the shape */ override var blockRowColumnPositions: [Orientation : Array<(columnDiff: Int, rowDiff: Int)>] { return [ Orientation.Zero: [(1, 0), (1, 1), (0, 1), (0, 2)], Orientation.Ninety: [(0, 0), (1, 0), (1, 1), (2, 1)], Orientation.OneEighty: [(1, 0), (1, 1), (0, 1), (0, 2)], Orientation.TwoSeventy: [(0, 0), (1, 0), (1, 1), (2, 1)] ] } override var bottomBlocksForOrientations: [Orientation : Array] { return [ Orientation.Zero: [blocks[SecondBlockIdx], blocks[FourthBlockIdx]], Orientation.Ninety: [blocks[FirstBlockIdx], blocks[ThirdBlockIdx], blocks[FourthBlockIdx]], Orientation.OneEighty: [blocks[SecondBlockIdx], blocks[FourthBlockIdx]], Orientation.TwoSeventy: [blocks[FirstBlockIdx], blocks[ThirdBlockIdx], blocks[FourthBlockIdx]] ] } }