summaryrefslogtreecommitdiff
path: root/bots
diff options
context:
space:
mode:
authorAineopintojen-harjoitustyo-Algoritmit-j <github-hy-tiralabra@v.hix.fi>2024-02-05 07:46:04 +0200
committerAineopintojen-harjoitustyo-Algoritmit-j <github-hy-tiralabra@v.hix.fi>2024-02-05 07:46:04 +0200
commitae57dacc625b9ded6fad48e9197b4a29ad692173 (patch)
tree0e284eae461e02d8e7be9233235c8e6c70241737 /bots
parenta7fe2d0dff18abd253db3f2f999259a281b09630 (diff)
Adding option for delaying autoplay.
Diffstat (limited to 'bots')
-rw-r--r--bots/bot.py8
1 files changed, 7 insertions, 1 deletions
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):