-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplayer.py
More file actions
46 lines (43 loc) · 1.21 KB
/
Copy pathplayer.py
File metadata and controls
46 lines (43 loc) · 1.21 KB
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
39
40
41
42
43
44
45
46
'''
player.py
Defines the interface for a blackjack player
'''
import abc
class Player(abc.ABC):
@abc.abstractclassmethod
def accepts_insurance(self, hand : str, upcard : str) -> bool:
pass
@abc.abstractclassmethod
def accepts_surrender(self, hand : str, upcard : str) -> bool:
pass
@abc.abstractclassmethod
def accepts_split(self, hand : str, upcard : str) -> bool:
pass
@abc.abstractclassmethod
def accepts_double(self, hand : str, upcard : str) -> bool:
pass
@abc.abstractclassmethod
def accepts_stand(self, hand : str, upcard : str) -> bool:
pass
@abc.abstractclassmethod
def show_card(self, card : str) -> None:
pass
@abc.abstractclassmethod
def show_decks_in_shoe(self, decks_in_shoe : int) -> None:
pass
@abc.abstractclassmethod
def get_bet_amount(self) -> float:
'Get the intendend amount do not take it from the player yet'
pass
@abc.abstractclassmethod
def receive_payoff(self, amount) -> None:
pass
@abc.abstractclassmethod
def set_minimum_bet(self, amount:float) -> None:
pass
@abc.abstractclassmethod
def set_maximum_bet(self, amount:float) -> None:
pass
@abc.abstractclassmethod
def make_bet(self, amount:float) -> None:
pass