Advertisement
Guest User

Untitled

a guest
Apr 28th, 2016
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.31 KB | None | 0 0
  1. lst = []
  2. for row in range(12):
  3.     row = []
  4.     for col in range(16):
  5.         cell_health = choice([0,0,0,0,0,1,2])
  6.         if (row == 0) or (row == 11):
  7.             cell_health = 2
  8.         else:
  9.             if (col == 0) or (col == 15):
  10.                 cell_health = 2
  11.         row.append(cell_health)
  12.         print(cell_health, "", end='')
  13.     lst.append(row)
  14.     print()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement