Cleanup bot code.
[poker.git] / bots / p1.py
diff --git a/bots/p1.py b/bots/p1.py
new file mode 100755 (executable)
index 0000000..b6e7b74
--- /dev/null
@@ -0,0 +1,17 @@
+#!/usr/bin/python
+
+import logging
+
+from hole_bot import HoleBot
+
+
+class AceBot (HoleBot):
+    """Go all in whenever there is an ace in the hole.
+    """
+    def _process_hole(self, hole, state):
+        state['all_in'] = 'A' in [card[0] for card in hole]
+
+
+if __name__ == '__main__':
+    b = AceBot()#log_level=logging.INFO)
+    b.run()