diff options
Diffstat (limited to 'board/board.py')
-rw-r--r-- | board/board.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/board/board.py b/board/board.py index 069b568..22885c7 100644 --- a/board/board.py +++ b/board/board.py @@ -93,8 +93,12 @@ class Board(): """ tarkistaa onko peli voitettu """ for y in range(self.size): for x in range(self.size): - if self.tiles[x][y] != 9 and self.masked[x][y]: - return False + if self.tiles[x][y] == 9: + if not self.masked[x][y]: + return False + else: + if self.masked[x][y]: + return False return True @@ -123,10 +127,6 @@ class Board(): print("Koordinaatit on pelilaudan ulkopuolella", file=stderr) return False - if self.masked[x][y] == 0: - print("Ei voi liputtaa avattua ruutua", file=stderr) - return False - match self.masked[x][y]: case 0: print("Ei voi liputtaa avattua ruutua", file=stderr) |