From e56c2153add98361ea7909789b195d3a702f85bb Mon Sep 17 00:00:00 2001 From: Aineopintojen-harjoitustyo-Algoritmit-j Date: Sun, 14 Jan 2024 13:47:35 +0200 Subject: Moving things around and adding fouth flag option for bot suggestions. --- board/board.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'board') 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) -- cgit v1.2.3