Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public func checkHorizontal() -> Bool {
- for r in 0..<6 {
- for c in 0..<4 {
- let w = grid[r][c]
- let x = grid[r][c + 1]
- let y = grid[r][c + 2]
- let z = grid[r][c + 3]
- if w == x && w == y && w == z && w != 0 {
- return true
- }
- }
- }
- return false
- }
Add Comment
Please, Sign In to add comment