Guest User

Untitled

a guest
Jan 22nd, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. public func checkHorizontal() -> Bool {
  2.  
  3. for r in 0..<6 {
  4. for c in 0..<4 {
  5.  
  6. let w = grid[r][c]
  7. let x = grid[r][c + 1]
  8. let y = grid[r][c + 2]
  9. let z = grid[r][c + 3]
  10.  
  11. if w == x && w == y && w == z && w != 0 {
  12. return true
  13. }
  14. }
  15. }
  16. return false
  17. }
Add Comment
Please, Sign In to add comment