diff options
author | Aineopintojen-harjoitustyo-Algoritmit-j <github-hy-tiralabra@v.hix.fi> | 2024-01-14 13:47:35 +0200 |
---|---|---|
committer | Aineopintojen-harjoitustyo-Algoritmit-j <github-hy-tiralabra@v.hix.fi> | 2024-01-14 13:47:35 +0200 |
commit | e56c2153add98361ea7909789b195d3a702f85bb (patch) | |
tree | fd7d9691a4b62f44b2c60f5cf62f006a9476124f /board/board.py | |
parent | 822d89c50a70277186f5c845e4341236548c16b7 (diff) |
Moving things around and adding fouth flag option for bot suggestions.
Diffstat (limited to 'board/board.py')
-rw-r--r-- | board/board.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/board/board.py b/board/board.py index 82e6835..04d81d1 100644 --- a/board/board.py +++ b/board/board.py @@ -121,7 +121,7 @@ class Board(): return self.masked[x][y] - def flag_tile(self, x, y): + def flag(self, x, y): """ aseta lippu peitetylle ruudulle""" if self.invalid_coordinates(x, y): print("Koordinaatit on pelilaudan ulkopuolella", file=stderr) @@ -131,10 +131,10 @@ class Board(): case 0: print("Ei voi liputtaa avattua ruutua", file=stderr) return False - case 10 | 11: + case 10 | 11 | 12: self.masked[x][y]+=1 return True - case 12: + case 13: self.masked[x][y]=10 return True @@ -142,7 +142,7 @@ class Board(): return False - def make_guess(self, x, y): + def guess(self, x, y): """ tee arvaus """ if self.invalid_coordinates(x, y): print("Koordinaatit on pelilaudan ulkopuolella", file=stderr) |