From ae57dacc625b9ded6fad48e9197b4a29ad692173 Mon Sep 17 00:00:00 2001 From: Aineopintojen-harjoitustyo-Algoritmit-j Date: Mon, 5 Feb 2024 07:46:04 +0200 Subject: Adding option for delaying autoplay. --- bots/bot.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'bots') diff --git a/bots/bot.py b/bots/bot.py index cc09936..51151e0 100644 --- a/bots/bot.py +++ b/bots/bot.py @@ -31,7 +31,13 @@ class Bot(): return Action.NOOP, 0, 0 def saved_hints(self): - """ onko muuveja varastossa """ + """ poistetaan auenneet laatat ja palautetaan onko muuveja """ + for tile in list(self.safe_tiles): + if self.known_tile(tile): + self.safe_tiles.remove(tile) + for tile in list(self.mine_tiles): + if self.known_tile(tile): + self.mine_tiles.remove(tile) return self.safe_tiles or self.mine_tiles def hint(self, matrix, cursor_x, cursor_y): -- cgit v1.2.3