SHARE
TWEET

Untitled

tinyevil Feb 20th, 2019 70 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. val cells = arrayOf(arrayOf(1, 1, 1),
  2.         arrayOf(0, 1, 1),
  3.         arrayOf(1, 0, 1)
  4.  
  5. var neighbors = cells[0][0] + cells[0][1] + cells[0][2]
  6.         + cells[1][0]       + cells[1][2]
  7.         +cells[2][0] + cells[2][1] + cells[2][2]
  8.  
  9. print(neighbors)
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