MCPcopy Index your code
hub / github.com/rawpython/remi / explosion

Method explosion

examples/minefield_app.py:250–266  ·  view source on GitHub ↗
(self, cell)

Source from the content-addressed store, hash-verified

248 checked_cells.append(self.mine_matrix[cell.y + _y][cell.x + _x])
249
250 def explosion(self, cell):
251 print("explosion")
252 self.mine_table = gui.Table(margin='0px auto')
253 self.main_container.append(self.mine_table, key="mine_table")
254 for x in range(0, len(self.mine_matrix[0])):
255 for y in range(0, len(self.mine_matrix)):
256 self.mine_matrix[y][x].style['background-color'] = 'red'
257 self.mine_matrix[y][x].check_mine(None, False)
258 self.mine_table.empty()
259
260 # self.mine_table.append_from_list(self.mine_matrix, False)
261 for x in range(0, len(self.mine_matrix[0])):
262 row = gui.TableRow()
263 for y in range(0, len(self.mine_matrix)):
264 row.append(self.mine_matrix[y][x])
265 self.mine_matrix[y][x].onclick.do(self.mine_matrix[y][x].check_mine)
266 self.mine_table.append(row)
267
268
269if __name__ == "__main__":

Callers 1

check_mineMethod · 0.80

Calls 5

appendMethod · 0.95
check_mineMethod · 0.80
appendMethod · 0.45
emptyMethod · 0.45
doMethod · 0.45

Tested by

no test coverage detected