diff options
author | Aineopintojen-harjoitustyo-Algoritmit-j <github-hy-tiralabra@v.hix.fi> | 2024-01-12 09:42:15 +0200 |
---|---|---|
committer | Aineopintojen-harjoitustyo-Algoritmit-j <github-hy-tiralabra@v.hix.fi> | 2024-01-12 09:42:15 +0200 |
commit | e09b6d1737f4573244a7faec46ec09bbb1d009a4 (patch) | |
tree | f8029cccb83f01c8de5a2f633c14ddedc7b5c509 /board/board.py | |
parent | b6c689abc6d5860671c45460a99b487eb6872e22 (diff) |
Trying to fix the 1x1 uncover bug. Adding instructions to readme.
Diffstat (limited to 'board/board.py')
-rw-r--r-- | board/board.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/board/board.py b/board/board.py index 3491c01..23dfa79 100644 --- a/board/board.py +++ b/board/board.py @@ -85,8 +85,9 @@ class Board(): print("Ruutu on jo avattu", file=stderr) return False + self.masked[x][y] = 0 + if self.tiles[x][y] == 9: - self.masked[x][y] = 0 return False if self.tiles[x][y] == 0: @@ -94,8 +95,6 @@ class Board(): for dx, dy in ( (0,-1), (-1,0), (0,0), (1,0), (0,1) ): if not self.invalid_coordinates(cx+dx, cy+dy): self.masked[cx+dx][cy+dy] = 0 - else: - self.masked[x][y] = 0 return True |