Skip to content
Snippets Groups Projects
Commit 61251e59 authored by Angy Wallot's avatar Angy Wallot
Browse files

tp.5

parent c47c6217
Branches
No related tags found
No related merge requests found
......@@ -111,7 +111,7 @@ class Minesweeper():
self.width = width
self.height = height
self.nbombs = nbombs
self.grid = [(Cell() for x in range(width) for y in range(height))]
self.grid = [[Cell() for x in range(width)] for y in range(height)]
self.state = GameState.unfinished
def get_cell(self, x: int, y: int) -> Cell:
......@@ -124,7 +124,7 @@ class Minesweeper():
$$$ sum(1 for x in range(20) for y in range(10) if game.get_cell(x, y).is_bomb)
4
"""
return self.grid[x][y]
def _put_a_bomb_at(self, x: int, y: int):
"""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment