-
Notifications
You must be signed in to change notification settings - Fork 0
/
game.py
318 lines (289 loc) · 25.5 KB
/
game.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
import random # For creating new tiles
import numpy as np # For arrays
class game:
def __init__(self):
self.game_box = np.zeros((4,4,4)) #initially making the 4*4*4 array's value 0 or "nothing" for all positions
first_position_list = [0,1,2,3]
first_row_to_begin = random.choice(first_position_list) #Randomly generates starting pos
first_column_to_begin = random.choice(first_position_list)
first_depth_to_begin = random.choice(first_position_list)
self.game_box[first_row_to_begin][first_column_to_begin][first_depth_to_begin] = 2 #placing the first 2 to begin the game in position selected randomly
self.points = 0 #Score starts at zero
def matrix(self): # exports current gamestate
return self.game_box
def up_movement(self):
#def up_movement(self.game_box): #function for up movement
i = 0
for k in range(0,4): #looping through all 2D matrix's in cube
for j in range(0,4): #looping through all four 4 columns
if self.game_box[i][j][k]!=0 or self.game_box[i+1][j][k]!=0 or self.game_box[i+2][j][k]!=0 or self.game_box[i+3][j][k]!=0: #condition to check whether any members of a column is non-zero to proceed
if self.game_box[i][j][k]==0: #condition to check if first member of a column is zero
while self.game_box[i][j][k] == 0: #looping until the first member of a column becomes non zero i.e moving lower members to top
self.game_box[i][j][k] = self.game_box[i+1][j][k]
self.game_box[i+1][j][k] = self.game_box[i+2][j][k]
self.game_box[i+2][j][k] = self.game_box[i+3][j][k]
self.game_box[i+3][j][k] = 0
if self.game_box[i+1][j][k]==0 and (self.game_box[i+2][j][k]!=0 or self.game_box[i+3][j][k]!=0): #condition to check if the second member of a column is zero and members below it are non-zero
while self.game_box[i+1][j][k]==0: #looping until second member of a column becomes non-zero i.e moving lower member upwards
self.game_box[i+1][j][k] = self.game_box[i+2][j][k]
self.game_box[i+2][j][k] = self.game_box[i+3][j][k]
self.game_box[i+3][j][k] = 0
if self.game_box[i+2][j][k] == 0 and self.game_box[i+3][j][k]!=0: #condition to check if the third member of a column is zero and member below it or the last member is non-zero
while self.game_box[i+2]==0: #looping until the third member of a column becomes non-zero
self.game_box[i+2][j][k] = self.game_box[i+3][j][k]
self.game_box[i+3][j][k] = 0
self.up_addition()
def up_addition(self):
i=0
for k in range(0,4):
for j in range(0,4): #looping through all the columns
if self.game_box[i][j][k]==self.game_box[i+1][j][k]: #condition to check if the first and second member of a column are equal or same
self.game_box[i][j][k]=self.game_box[i][j][k]+self.game_box[i+1][j][k] #adding first and second member of a column and storing it as the first member
self.points += self.game_box[i][j][k] ** 2 #adding point for joining simillar tiles
self.game_box[i+1][j][k]=self.game_box[i+2][j][k] #moving third member of a column to second position
self.game_box[i+2][j][k]=self.game_box[i+3][j][k] #moving fourth member of a column to third position
self.game_box[i+3][j][k]=0 #assigning fourth member of a column as 0 i.e nothing
if self.game_box[i+1][j][k]==self.game_box[i+2][j][k]: #condition to check if the second and third member of a column are equal or same
self.game_box[i+1][j][k]=self.game_box[i+1][j][k]+self.game_box[i+2][j][k] #adding second and third member of a column and storing it as second member
self.points += self.game_box[i+1][j][k] ** 2 #adding self.points for joining simillar tiles
self.game_box[i+2][j][k]=self.game_box[i+3][j][k] #moving fourth member to third position
self.game_box[i+3][j][k]=0 #assigning the fourth member to 0 or nothing
if self.game_box[i+2][j][k]==self.game_box[i+3][j][k]: #condition to check if the third and fourth member of a column are equal or same
self.game_box[i+2][j][k]=self.game_box[i+2][j][k]+self.game_box[i+3][j][k] #adding third and fourth member of a column and storing it a third member
self.points += self.game_box[i+2][j][k] ** 2 #adding self.points for joining simillar tiles
self.game_box[i+3][j][k]=0 #assigning fourth member to 0 or nothing
def down_movement(self): #function for down movement
i=0
for k in range(0,4):
for j in range(0,4): #looping through all the columns
if self.game_box[i][j][k]!=0 or self.game_box[i+1][j][k]!=0 or self.game_box[i+2][j][k]!=0 or self.game_box[i+3][j][k]!=0: #condition to check if any members of a column is non-zero in order to begin
if self.game_box[i+3][j][k]==0: #condition to check if the last member(fourth member) of a column is zero
while self.game_box[i+3][j][k]==0: #looping until the fourth member of a column becomes non-zero i.e moving the upper members to the bottom
self.game_box[i+3][j][k]=self.game_box[i+2][j][k]
self.game_box[i+2][j][k]=self.game_box[i+1][j][k]
self.game_box[i+1][j][k]=self.game_box[i][j][k]
self.game_box[i][j][k]=0
if self.game_box[i+2][j][k]==0 and (self.game_box[i+1][j][k]!=0 or self.game_box[i][j][k]!=0): #condition to check if the third member of a column is zero and any members above it is non-zero
while self.game_box[i+2][j][k]==0: #looping until the third member of a column becomes non-zero
self.game_box[i+2][j][k]=self.game_box[i+1][j][k]
self.game_box[i+1][j][k]=self.game_box[i][j][k]
self.game_box[i][j][k]=0
if self.game_box[i+1][j][k]==0 and self.game_box[i][j][k]!=0: #condition to check if the second member of a column is zero and member above it(first member is non-zero)
while self.game_box[i+1][j][k]==0: #looping until the second member becomes non-zero
self.game_box[i+1][j][k]=self.game_box[i][j][k]
self.game_box[i][j][k]=0
self.down_addition()
def down_addition(self): #function for downward addition after downward movement
i=0
for k in range(0,4): #loop through all matrices
for j in range(0,4): #looping through all the columns
if self.game_box[i+3][j][k]==self.game_box[i+2][j][k]: #condition to check if the fourth member and third member of a column are equal or same
self.game_box[i+3][j][k]=self.game_box[i+3][j][k] + self.game_box[i+2][j][k] #Adding fourth and third member of a column and storing as the fourth member
self.points += self.game_box[i+3][j][k] ** 2 #adding self.points for joining simillar tiles
self.game_box[i+2][j][k]=self.game_box[i+1][j][k] #Moving the second member to third position in a column
self.game_box[i+1][j][k]=self.game_box[i][j][k] #Moving the first member to second position in a column
self.game_box[i][j][k]=0 #Assigning the first member of a column to zero
if self.game_box[i+2][j][k]==self.game_box[i+1][j][k]: #condition to check if the third member and second member of a column are equal or same
self.game_box[i+2][j][k]=self.game_box[i+2][j][k]+self.game_box[i+1][j][k] #Adding third and second member of a column and storing as the third member
self.points += self.game_box[i+2][j][k] ** 2 #adding self.points for joining simillar tiles
self.game_box[i+1][j][k]=self.game_box[i][j][k] #Moving the first member to second position in a column
self.game_box[i][j][k]=0 #Assigning zero to the first member of a column
if self.game_box[i+1][j][k]==self.game_box[i][j][k]: #condition to check if the seconf and first member of a column are equal or same
self.game_box[i+1][j][k]=self.game_box[i+1][j][k]+self.game_box[i][j][k] #Adding the second and first member of a column and storing as the second member
self.points += self.game_box[i+1][j][k] ** 2 #adding self.points for joining simillar tiles
self.game_box[i][j][k]=0 #Assigning zero to the first member of a column
def left_movement(self): #function for left movement
j=0
for k in range(0,4): #loop through all 2D matrices
for i in range(0,4): #looping through all the rows
if self.game_box[i][j][k]!=0 or self.game_box[i][j+1][k]!=0 or self.game_box[i][j+2][k]!=0 or self.game_box[i][j+3][k]!=0: #condition to check if members of a row is non-zero to proceed
if self.game_box[i][j][k]==0: #Condition to check if the first member of a row is zero
while self.game_box[i][j][k]==0: #looping until the first member of a row becomes non-zero
self.game_box[i][j][k]=self.game_box[i][j+1][k]
self.game_box[i][j+1][k]=self.game_box[i][j+2][k]
self.game_box[i][j+2][k] = self.game_box[i][j+3][k]
self.game_box[i][j+3][k]=0
if self.game_box[i][j+1][k]==0 and (self.game_box[i][j+2][k]!=0 or self.game_box[i][j+3][k]!=0): #condition to check if second member of a row is zero and any members right to it is non-zero
while self.game_box[i][j+1][k]==0: #looping until the second member of a row becomes non-zero
self.game_box[i][j+1][k]=self.game_box[i][j+2][k]
self.game_box[i][j+2][k]=self.game_box[i][j+3][k]
self.game_box[i][j+3][k]=0
if self.game_box[i][j+2][k]==0 and (self.game_box[i][j+3][k]!=0): #condition to check if third member of a row is zero and the member right to it(fourth member is non-zero
while self.game_box[i][j+2][k]==0: #looping until the third member of a row becomes non-zero
self.game_box[i][j+2][k]=self.game_box[i][j+3][k]
self.game_box[i][j+3][k]=0
self.left_addition()
def left_addition(self): #function for left addition after left movement
j=0
for k in range(0,4):
for i in range(0,4): #looping through all the rows
if self.game_box[i][j][k]==self.game_box[i][j+1][k]: #condition to check if the first member of a row is equal to the second member of a row
self.game_box[i][j][k]=self.game_box[i][j][k]+self.game_box[i][j+1][k] #Adding the first and second member and storing result as first member of a row
self.points += self.game_box[i][j][k] ** 2 #adding self.points for joining simillar tiles
self.game_box[i][j+1][k]=self.game_box[i][j+2][k] #Moving the third member of a row to second position
self.game_box[i][j+2][k]=self.game_box[i][j+3][k] #Moving the fourth member of a row to third position
self.game_box[i][j+3][k]=0 #Assigning 0 to the fourth member of a row
if self.game_box[i][j+1][k]==self.game_box[i][j+2][k]: #Condition to check if the second member of a row is equal to the third member of that row
self.game_box[i][j+1][k]=self.game_box[i][j+1][k]+self.game_box[i][j+2][k] #Adding second and third member of a row and storing as second member
self.points += self.game_box[i][j+1][k] ** 2 #adding self.points for joining simillar tiles
self.game_box[i][j+2][k]=self.game_box[i][j+3][k] #Moving the fourth member of a row to third position
self.game_box[i][j+3][k]=0 #Assigning zero to the fourth member of a row
if self.game_box[i][j+2][k]==self.game_box[i][j+3][k]: #Condition to check if the third and fourth member of a row are equal or same
self.game_box[i][j+2][k]=self.game_box[i][j+2][k]+self.game_box[i][j+3][k] #Adding the third and the fourth member of a row
self.points += self.game_box[i][j+2][k] ** 2 #adding self.points for joining simillar tiles
self.game_box[i][j+3][k]=0 #Assigning zero to the fourth member of a row
def right_movement(self): #function for right movement
j=0
for k in range(0,4):
for i in range(0,4): #looping through all the rows
if self.game_box[i][j][k]!=0 or self.game_box[i][j+1][k]!=0 or self.game_box[i][j+2][k]!=0 or self.game_box[i][j+3][k]!=0: #condition to check if any members of a row is non zero in order to proceed
if self.game_box[i][j+3][k]==0: #Condition to check if the last(fourth) member of a row is zero
while self.game_box[i][j+3][k]==0: #looping until the last member of a row becomes non-zero
self.game_box[i][j+3][k]=self.game_box[i][j+2][k]
self.game_box[i][j+2][k]=self.game_box[i][j+1][k]
self.game_box[i][j+1][k]=self.game_box[i][j][k]
self.game_box[i][j][k]=0
if self.game_box[i][j+2][k]==0 and (self.game_box[i][j+1][k]!=0 or self.game_box[i][j][k]!=0): #Condition to check if the third member of a row is zero and any member before it(first and second) is non-zero
while self.game_box[i][j+2][k]==0: #looping until the third member of a row becomes non-zero
self.game_box[i][j+2][k]=self.game_box[i][j+1][k]
self.game_box[i][j+1][k]=self.game_box[i][j][k]
self.game_box[i][j][k]=0
if self.game_box[i][j+1][k]==0 and self.game_box[i][j][k]!=0: #Condition to check if the second member of a row is zero and member before it(first member) is non-zero
while self.game_box[i][j+1][k]==0: #looping until the second member becomes non-zero
self.game_box[i][j+1][k]=self.game_box[i][j][k]
self.game_box[i][j][k]=0
self.right_addition()
def right_addition(self): #function for right addition after right movement
j=0
for k in range(0,4):
for i in range(0,4): #looping through all the rows
if self.game_box[i][j+3][k]==self.game_box[i][j+2][k]: #Condition to check if the fourth and third member of a row are equal
self.game_box[i][j+3][k]=self.game_box[i][j+3][k] + self.game_box[i][j+2][k] #Adding the fourth and third member of a row and storing it as the fourth member
self.points += self.game_box[i][j+3][k] ** 2 #adding self.points for joining simillar tiles
self.game_box[i][j+2][k]=self.game_box[i][j+1][k] #Moving the second member of a row to third position
self.game_box[i][j+1][k]=self.game_box[i][j][k] #Moving the first member of a row to second position
self.game_box[i][j][k]=0 #Assigning zero to the first member of a row
if self.game_box[i][j+2][k]==self.game_box[i][j+1][k]: #Condition to check if the third and second member of a row are equal or same
self.game_box[i][j+2][k]=self.game_box[i][j+2][k]+self.game_box[i][j+1][k] #Adding the third and second member and storing it as the third member
self.points += self.game_box[i][j+2][k] ** 2 #adding self.points for joining simillar tiles
self.game_box[i][j+1][k]=self.game_box[i][j][k] #Moving first member of a row to second position
self.game_box[i][j][k]=0 #Assigning zero to the first member of a row
if self.game_box[i][j+1][k]==self.game_box[i][j][k]: #Condition to check if the second and first member of a row are equal or same
self.game_box[i][j+1][k]=self.game_box[i][j+1][k]+self.game_box[i][j][k] #Adding second and first member of a row and storing it as second member of that row
self.points += self.game_box[i][j+1][k] ** 2 #adding self.points for joining simillar tiles
self.game_box[i][j][k]=0 #Assigning zero to the first member of a row
def forward_movement(self): #function for forward movement
k = 0
for j in range(0,4):
for i in range(0,4):
if self.game_box[i][j][k]!=0 or self.game_box[i][j][k+1]!=0 or self.game_box[i][j][k+2]!=0 or self.game_box[i][j][k+3]!=0:
if self.game_box[i][j][k] == 0:
while self.game_box[i][j][k] == 0:
self.game_box[i][j][k] = self.game_box[i][j][k+1]
self.game_box[i][j][k+1] = self.game_box[i][j][k+2]
self.game_box[i][j][k+2] = self.game_box[i][j][k+3]
self.game_box[i][j][k+3] = 0
if self.game_box[i][j][k+1] == 0 and (self.game_box[i][j][k+2] !=0 or self.game_box[i][j][k+3]!=0):
while self.game_box[i][j][k+1] == 0:
self.game_box[i][j][k+1] = self.game_box[i][j][k+2]
self.game_box[i][j][k+2] = self.game_box[i][j][k+3]
self.game_box[i][j][k+3] = 0
if self.game_box[i][j][k+2] == 0 and self.game_box[i][j][k+3]!=0:
while self.game_box[i][j][k+2]==0:
self.game_box[i][j][k+2] = self.game_box[i][j][k+3]
self.game_box[i][j][k+3] = 0
self.forward_addition()
def forward_addition(self):
k = 0
for j in range(0,4):
for i in range(0,4):
if self.game_box[i][j][k] == self.game_box[i][j][k+1]:
self.game_box[i][j][k] = self.game_box[i][j][k] + self.game_box[i][j][k+1]
self.points += self.game_box[i][j][k] ** 2
self.game_box[i][j][k+1] = self.game_box[i][j][k+2]
self.game_box[i][j][k+2] = self.game_box[i][j][k+3]
self.game_box[i][j][k+3] = 0
if self.game_box[i][j][k+1] == self.game_box[i][j][k+2]:
self.game_box[i][j][k+1] = self.game_box[i][j][k+2] + self.game_box[i][j][k+1]
self.points += self.game_box[i][j][k+1] ** 2
self.game_box[i][j][k+2] = self.game_box[i][j][k+3]
self.game_box[i][j][k+3] = 0
if self.game_box[i][j][k+2] == self.game_box[i][j][k+3]:
self.game_box[i][j][k+2] = self.game_box[i][j][k+2] + self.game_box[i][j][k+3]
self.points += self.game_box[i][j][k+2] ** 2
self.game_box[i][j][k+3] = 0
def backward_movement(self): #function for forward movement
k = 0
for j in range(0,4):
for i in range(0,4):
if self.game_box[i][j][k]!=0 or self.game_box[i][j][k+1]!=0 or self.game_box[i][j][k+2]!=0 or self.game_box[i][j][k+3]!=0:
if self.game_box[i][j][k+3] == 0:
while self.game_box[i][j][k+3] == 0:
self.game_box[i][j][k+3] = self.game_box[i][j][k+2]
self.game_box[i][j][k+2] = self.game_box[i][j][k+1]
self.game_box[i][j][k+1] = self.game_box[i][j][k]
self.game_box[i][j][k] = 0
if self.game_box[i][j][k+2] == 0 and (self.game_box[i][j][k+1] !=0 or self.game_box[i][j][k]!=0):
while self.game_box[i][j][k+2] == 0:
self.game_box[i][j][k+2] = self.game_box[i][j][k+1]
self.game_box[i][j][k+1] = self.game_box[i][j][k]
self.game_box[i][j][k] = 0
if self.game_box[i][j][k+1] == 0 and self.game_box[i][j][k]!=0:
while self.game_box[i][j][k+1]==0:
self.game_box[i][j][k+1] = self.game_box[i][j][k]
self.game_box[i][j][k] = 0
self.backward_addition()
def backward_addition(self):
k = 0
self.points
for j in range(0,4):
for i in range(0,4):
if self.game_box[i][j][k+3] == self.game_box[i][j][k+2]:
self.game_box[i][j][k+3] = self.game_box[i][j][k+3] + self.game_box[i][j][k+2]
self.points += self.game_box[i][j][k+3] ** 2
self.game_box[i][j][k+2] = self.game_box[i][j][k+1]
self.game_box[i][j][k+1] = self.game_box[i][j][k]
self.game_box[i][j][k] = 0
if self.game_box[i][j][k+2] == self.game_box[i][j][k+1]:
self.game_box[i][j][k+2] = self.game_box[i][j][k+2] + self.game_box[i][j][k+1]
self.points += self.game_box[i][j][k+2] ** 2
self.game_box[i][j][k+1] = self.game_box[i][j][k]
self.game_box[i][j][k] = 0
if self.game_box[i][j][k+1] == self.game_box[i][j][k]:
self.game_box[i][j][k+1] = self.game_box[i][j][k+1] + self.game_box[i][j][k]
self.points += self.game_box[i][j][k+1] ** 2
self.game_box[i][j][k] = 0
def isWon(self): # If There are any 2048 tiles the player has won, Also addes new tiles to board
row_indexes_with_zero = []
column_indexes_with_zero = []
depth_indexes_with_zero = []
for i in range(0,4):
for j in range(0,4):
for k in range(0,4):
if self.game_box[i][j][k] == 0:
row_indexes_with_zero.append(i)
column_indexes_with_zero.append(j)
depth_indexes_with_zero.append(k)
if self.game_box[i][j][k] == 2048:
print "Congratulations!! You've successfully sumed up a 2048 tile"
return True
if len(row_indexes_with_zero) > 1:
random_index = row_indexes_with_zero.index(random.choice(row_indexes_with_zero))
row_to_place_entry = row_indexes_with_zero[random_index]
column_to_place_entry = column_indexes_with_zero[random_index]
depth_to_place_entry = depth_indexes_with_zero[random_index]
self.game_box[row_to_place_entry][column_to_place_entry][depth_to_place_entry] = 2
elif len(row_indexes_with_zero) == 1:
row_to_place_entry = row_indexes_with_zero[0]
column_to_place_entry = column_indexes_with_zero[0]
depth_to_place_entry = depth_indexes_with_zero[0]
self.game_box[row_to_place_entry][column_to_place_entry][depth_to_place_entry] = 2
return False
def printBoard(self): # prints current board to terminal
print ("Points>>>>>>")
print (self.points)
print ("\n\n")
print (self.game_box[0][0][0],"\t",self.game_box[0][1][0],"\t",self.game_box[0][2][0],"\t",self.game_box[0][3][0],"\t","\t",self.game_box[0][0][1],"\t",self.game_box[0][1][1],"\t",self.game_box[0][2][1],"\t",self.game_box[0][3][1],"\t","\t",self.game_box[0][0][2],"\t",self.game_box[0][1][2],"\t",self.game_box[0][2][2],"\t",self.game_box[0][3][2],"\t","\t",self.game_box[0][0][3],"\t",self.game_box[0][1][3],"\t",self.game_box[0][2][3],"\t",self.game_box[0][3][3],"\n")
print (self.game_box[1][0][0],"\t",self.game_box[1][1][0],"\t",self.game_box[1][2][0],"\t",self.game_box[1][3][0],"\t","\t",self.game_box[1][0][1],"\t",self.game_box[1][1][1],"\t",self.game_box[1][2][1],"\t",self.game_box[1][3][1],"\t","\t",self.game_box[1][0][2],"\t",self.game_box[1][1][2],"\t",self.game_box[1][2][2],"\t",self.game_box[1][3][2],"\t","\t",self.game_box[1][0][3],"\t",self.game_box[1][1][3],"\t",self.game_box[1][2][3],"\t",self.game_box[1][3][3],"\n")
print (self.game_box[2][0][0],"\t",self.game_box[2][1][0],"\t",self.game_box[2][2][0],"\t",self.game_box[2][3][0],"\t","\t",self.game_box[2][0][1],"\t",self.game_box[2][1][1],"\t",self.game_box[2][2][1],"\t",self.game_box[2][3][1],"\t","\t",self.game_box[2][0][2],"\t",self.game_box[2][1][2],"\t",self.game_box[2][2][2],"\t",self.game_box[2][3][2],"\t","\t",self.game_box[2][0][3],"\t",self.game_box[2][1][3],"\t",self.game_box[2][2][3],"\t",self.game_box[2][3][3],"\n")
print (self.game_box[3][0][0],"\t",self.game_box[3][1][0],"\t",self.game_box[3][2][0],"\t",self.game_box[3][3][0],"\t","\t",self.game_box[3][0][1],"\t",self.game_box[3][1][1],"\t",self.game_box[3][2][1],"\t",self.game_box[3][3][1],"\t","\t",self.game_box[3][0][2],"\t",self.game_box[3][1][2],"\t",self.game_box[3][2][2],"\t",self.game_box[3][3][2],"\t","\t",self.game_box[3][0][3],"\t",self.game_box[3][1][3],"\t",self.game_box[3][2][3],"\t",self.game_box[3][3][3],"\n")