@@ -206,73 +206,73 @@ async def poker_game() -> None:
206206 except :
207207 print ("Input Error: use commas to separated the cards you want to hold" )
208208
209- print (player .cards )
210- # Score
211- score = PokerScorer (player .cards )
212- straight = score .straight ()
213- flush = score .flush ()
214- highestCount = score .highestCount ()
215- pairs = score .pairs ()
216-
217- # Royal flush
218- if straight and flush and straight == 14 :
219- print ("Royal Flush!!!" )
220- print ("+2000" )
221- points += 2000
222-
223- # Straight flush
224- elif straight and flush :
225- print ("Straight Flush!" )
226- print ("+250" )
227- points += 250
228-
229- # 4 of a kind
230- elif score .fourKind ():
231- print ("Four of a kind!" )
232- print ("+125" )
233- points += 125
234-
235- # Full House
236- elif score .fullHouse ():
237- print ("Full House!" )
238- print ("+40" )
239- points += 40
240-
241- # Flush
242- elif flush :
243- print ("Flush!" )
244- print ("+25" )
245- points += 25
246-
247- # Straight
248- elif straight :
249- print ("Straight!" )
250- print ("+20" )
251- points += 20
252-
253- # 3 of a kind
254- elif highestCount == 3 :
255- print ("Three of a Kind!" )
256- print ("+15" )
257- points += 15
258-
259- # 2 pair
260- elif len (pairs ) == 2 :
261- print ("Two Pairs!" )
262- print ("+10" )
263- points += 10
264-
265- # Jacks or better
266- elif pairs and pairs [0 ] > 10 :
267- print ("Jacks or Better!" )
268- print ("+5" )
269- points += 5
270-
271- player .cards = []
272-
273- print ()
274- print ()
275- print ()
209+ print (player .cards )
210+ # Score
211+ score = PokerScorer (player .cards )
212+ straight = score .straight ()
213+ flush = score .flush ()
214+ highestCount = score .highestCount ()
215+ pairs = score .pairs ()
216+
217+ # Royal flush
218+ if straight and flush and straight == 14 :
219+ print ("Royal Flush!!!" )
220+ print ("+2000" )
221+ points += 2000
222+
223+ # Straight flush
224+ elif straight and flush :
225+ print ("Straight Flush!" )
226+ print ("+250" )
227+ points += 250
228+
229+ # 4 of a kind
230+ elif score .fourKind ():
231+ print ("Four of a kind!" )
232+ print ("+125" )
233+ points += 125
234+
235+ # Full House
236+ elif score .fullHouse ():
237+ print ("Full House!" )
238+ print ("+40" )
239+ points += 40
240+
241+ # Flush
242+ elif flush :
243+ print ("Flush!" )
244+ print ("+25" )
245+ points += 25
246+
247+ # Straight
248+ elif straight :
249+ print ("Straight!" )
250+ print ("+20" )
251+ points += 20
252+
253+ # 3 of a kind
254+ elif highestCount == 3 :
255+ print ("Three of a Kind!" )
256+ print ("+15" )
257+ points += 15
258+
259+ # 2 pair
260+ elif len (pairs ) == 2 :
261+ print ("Two Pairs!" )
262+ print ("+10" )
263+ points += 10
264+
265+ # Jacks or better
266+ elif pairs and pairs [0 ] > 10 :
267+ print ("Jacks or Better!" )
268+ print ("+5" )
269+ points += 5
270+
271+ player .cards = []
272+
273+ print ()
274+ print ()
275+ print ()
276276
277277@workflow .defn
278278class PokerWorkflow :
0 commit comments