daily pastebin goal
35%
SHARE
TWEET

Untitled

a guest Jan 22nd, 2019 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top