File tree Expand file tree Collapse file tree 1 file changed +32
-1
lines changed
Expand file tree Collapse file tree 1 file changed +32
-1
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ def __init__(self):
4343
4444 def __repr__ (self ):
4545 return "Standard deck of cards:{0} cards remaining" .format (len (self .cards ))
46-
46+
4747 def shuffle (self , times = 1 ):
4848 random .shuffle (self .cards )
4949 print ("Deck Shuffled" )
@@ -58,6 +58,9 @@ def __init__(self):
5858 def cardCount (self ):
5959 return len (self .cards )
6060
61+ def addCard (self , card ):
62+ self .cards .append (card )
63+
6164class PokerScorer (object ):
6265 def __init__ (self , cards ):
6366 # Number of cards
@@ -98,3 +101,31 @@ def highCard(self):
98101 elif highCard .value < card .value :
99102 highCard = card
100103 return highCard
104+
105+ def interpreterVideoPoker ():
106+ player = Player ()
107+
108+ # initial amount
109+ initialAmount = 100
110+ # cost per hand
111+ handCost = 5
112+
113+ ## hand loop
114+ discard = []
115+
116+ # shuffle
117+ deck = StandardDeck ()
118+ deck .shuffle ()
119+
120+ # deal
121+ for i in range (5 ):
122+ player .addCard (deck .deal ())
123+
124+ for card in player .cards :
125+ card .showing = True
126+
127+ # hold or pass
128+ # score
129+
130+ print (player .cards )
131+
You can’t perform that action at this time.
0 commit comments