Please, help with my game.

I want to be able to roll the matrix.

I’m already done: (add_new() is work, but don’t use)

```
import numpy as np
import random
grid = np.zeros((4,4), dtype=int)
def init_grid():
rcoor = random.randint(0, 3) #rcoor = random + coordination
rcoor1 = random.randint(0, 3)
grid[rcoor, rcoor1] = 2
rcoor = random.randint(0, 3)
rcoor1 = random.randint(0, 3)
grid[rcoor, rcoor1] = 2
def add_new():
rcoor = random.randint(0, 3)
rcoor1 = random.randint(0, 3)
num = random.randint(1, 10) # < Choice 2 or 4
if num <= 8: # < Choice 2 or 4
num = 2 # < Choice 2 or 4
else: # < Choice 2 or 4
num = 4 # < Choice 2 or 4
if is_empty(rcoor, rcoor1) == True:
grid[rcoor, rcoor1] = num
else:
add_new()
if 0 not in grid:
print("Lose")
def is_empty(a, b):
if grid[a, b] == 0:
return True
else:
return False
init_grid()
print(grid)
<<<[[2 0 0 0]
[0 0 0 0]
[0 0 0 0]
[0 0 0 2]]
```

It print:

[[2 0 0 0]

[0 0 0 0]

[0 0 0 0]

[0 0 0 2]]

(the result may vary)