Fix life_for_two.py compile error.

It seems like it will always give a build error even if you don't touch this specific file, so I initialized everything at the start.
This commit is contained in:
Andrei Ursu
2022-09-06 01:40:49 +02:00
parent 6e1d38918a
commit 6ef7b1fc05

View File

@@ -6,24 +6,15 @@ Competitive Game of Life (two or more players).
Ported by Sajid Sarker (2022).
'''
# Global Variable Initialisation
gn = []
gx = []
gy = []
# Initialise the board
gn = [[0 for i in range(6)] for j in range(6)]
gx = [0 for x in range(3)]
gy = [0 for x in range(3)]
gk = [0, 3, 102, 103, 120, 130, 121, 112, 111, 12, 21, 30, 1020, 1030, 1011, 1021, 1003, 1002, 1012]
ga = [0, -1, 0, 1, 0, 0, -1, 0, 1, -1, -1, 1, -1, -1, 1, 1, 1]
m2 = 0
m3 = 0
# Initialise the board
for j in range(6):
gn.append([])
for k in range(6):
gn[j].append(0)
for i in range(3):
gx.append(0)
gy.append(0)
# Helper Functions
def tab(number) -> str:
t = ""