tmscli 0.2.0__tar.gz → 0.2.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -50,8 +50,9 @@ class minesweeper():
|
|
|
50
50
|
for k in range(-1,2):
|
|
51
51
|
for l in range(-1,2):
|
|
52
52
|
try:
|
|
53
|
-
if
|
|
54
|
-
|
|
53
|
+
if (i+k >=0) and (j+l >=0):
|
|
54
|
+
if board[i+k][j+l][2]=='M':
|
|
55
|
+
c+=1
|
|
55
56
|
except:
|
|
56
57
|
pass
|
|
57
58
|
board[i][j][2]=c
|
|
@@ -89,14 +90,15 @@ class minesweeper():
|
|
|
89
90
|
board[x][y][3]=True
|
|
90
91
|
for i in range(-1,2):
|
|
91
92
|
for j in range(-1,2):
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
board[x+i][y+j][
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
93
|
+
if x+i>=0 and y+j>=0:
|
|
94
|
+
try:
|
|
95
|
+
if not board[x+i][y+j][3]:
|
|
96
|
+
board[x+i][y+j][0]=True
|
|
97
|
+
board[x+i][y+j][3]=True
|
|
98
|
+
if board[x+i][y+j][2]==0:
|
|
99
|
+
self.richochet(board,(x+i,y+j))
|
|
100
|
+
except:
|
|
101
|
+
continue
|
|
100
102
|
|
|
101
103
|
return board
|
|
102
104
|
|
|
@@ -138,7 +140,12 @@ commands:
|
|
|
138
140
|
uc x y = uncovers square (x,y)
|
|
139
141
|
fl x y = flags square (x,y)
|
|
140
142
|
uf x y = unflags square (x,y)
|
|
141
|
-
|
|
143
|
+
y------>
|
|
144
|
+
x
|
|
145
|
+
|
|
|
146
|
+
|
|
|
147
|
+
|
|
|
148
|
+
V
|
|
142
149
|
Aim:
|
|
143
150
|
uncover every square without a mine on it
|
|
144
151
|
|
|
File without changes
|
|
File without changes
|