summaryrefslogtreecommitdiff
path: root/bots/idiot.py
diff options
context:
space:
mode:
Diffstat (limited to 'bots/idiot.py')
-rw-r--r--bots/idiot.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/bots/idiot.py b/bots/idiot.py
new file mode 100644
index 0000000..4f1f9f4
--- /dev/null
+++ b/bots/idiot.py
@@ -0,0 +1,17 @@
+""" bots/idiot.py - se ensimmäinen botti joka tekee kaiken väärin """
+from bots.bot import Bot
+from tui.static import Action
+class IdiotBot(Bot):
+ """ IdiotBot - merkistsee kaikki turvallisiksi avata """
+ # pylint: disable = too-few-public-methods
+
+ def hint(self, matrix, x, y):
+ """ merkitsee jonkin ruudun """
+ super().hint(matrix, x, y)
+ # pylint: disable = consider-using-enumerate
+ for ty in range(len(matrix[0])):
+ for tx in range(len(matrix)):
+ if matrix[tx][ty]==10:
+ return(Action.SAFE, tx, ty)
+ return (Action.NOOP, x, y)
+ \ No newline at end of file