Skip to content

m0rpL1nG/poker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 

Repository files navigation

Python Poker

This program receive poker n hands and return the winner.

Description

1 Deck have 52 cards divided into 4 suits 1 suit have 13 ranks.

  • Suit

    • S = Spade
    • H = Heart
    • D = Diamond
    • C = Club
  • Rank 1 Suit have 13 ranks.
    A K Q J T 9 8 7 6 5 4 3 2

    • A = Ace
    • K = King
    • Q = Queen
    • J = Jack
    • T = 10

poker have 9 hand ranks you can see it from here.

http://www.pokerstars.com/poker/games/rules/hand-rankings/

Requirement

poker

Usage

First set you terminal to run the script.

bash$ python poker.py

Then the program would ask you how many poker hand do you want.(input must be integer)

how much hand do you want? : 2

Then you should be able to input your poker hand.(input must be list of string)

hand 1 : ['5H', '5S', '5D', '8C', '8S']
hand 2 : ['6H', '6S', '6D', '7C', 'KS']

And then the result would came out.

winner is : [['5H', '5S', '5D', '8C', '8S']]	

Example

bash$ python poker.py
how much hand do you want? :  3
hand 1 : ['JS', 'TS', '9S', '8S', '7S']
hand 2 : ['5S', '3H', '9D', '8C', '8S']
hand 3 : ['4S', '4H', '7D', '3C', '3S']
winner is : [['JS', 'TS', '9S', '8S', '7S']]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages