jeudi 29 septembre 2016

How to get the output from a function and call it from a function inside an if statement

extremely new to python, or programming of any kind for that matter I'm working on a poker program, but have run into a couple issues.

1st - I would like for the cards to be based on the standard 52-card deck, right now when I run the program it will print out the set of 5 cards for each player, but there are times when several players can have the same card, which is obviously not accurate compared to a standard poker game.

2nd - I want to define the hand rankings (Ace high, pair, two pair, three of a kind, etc)...but I cannot figure out how to code (in English) - "If the result of the 'Dealem' function returns a pair, print 'player1 has a pair'. If the result for player 2 is QDiamondsm QClubs, QSpades, 2Heats, 5Spades, print 'player2 has Trips'....etc, etc...

Aucun commentaire:

Enregistrer un commentaire