from holdem.records import Decision, Move
class MyBrain:
def __init__(self, name="mine"):
self.name = name
def decide(self, situation):
if not situation.legal:
raise ValueError("it is not this seat's turn")
can_check = any(option.move == "check" for option in situation.legal)
return Decision(chosen=Move(move="check" if can_check else "call"))