Advertisement
tinyevil

Untitled

Feb 20th, 2019
747
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Kotlin 0.23 KB | None | 0 0
  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)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement