-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtest_bots.py
More file actions
40 lines (31 loc) · 975 Bytes
/
Copy pathtest_bots.py
File metadata and controls
40 lines (31 loc) · 975 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
__author__ = 'montanawong'
from .my_bot import MyBot
from .strategy import AlwaysCall, AlwaysBet
class TestBot1(MyBot):
"""
Naive bot for testing.
This bot always checks/calls no matter what
"""
def __init__(self, name):
super().__init__(self)
self.strategy = AlwaysCall()
self.name = name
def get_action(self, context):
action = self.strategy.determine_action(context, self)
return action
def set_pocket(self, card1, card2):
super().set_pocket(card1, card2)
class TestBot2(MyBot):
"""
Naive bot for testing.
This bot always bets/calls no matter what
"""
def __init__(self, name):
super().__init__()
self.strategy = AlwaysBet()
self.name = name
def get_action(self, context):
action = self.strategy.determine_action(context, self)
return action
def set_pocket(self, card1, card2):
super().set_pocket(card1, card2)