Skip to content

Latest commit

 

History

History
31 lines (23 loc) · 1.29 KB

README.md

File metadata and controls

31 lines (23 loc) · 1.29 KB

Description

Small web app developed with Javascript that takes two hands of cards and evaluates which one wins using poker rules

Installation

Just open the file index.html in your prefered browser

Note: If you get any cross-domain error you might need to install a plugin on your browser to enable cross-origin resource sharing

Poker rules

Each hand consists in a set of five​ cards. One hand wins if its hand ranking is better. If two hands are ranked equally, then the hand with the highest value cards wins. If the two hands are both ranked equally and their highest cards are the same, then the second highests cards are compared, and so on. If they are still equal, it’s a tie.

Hands Ranking:

  1. High Card: Highest value card. Order is 2, 3, 4, 5, 6, 7, 8, 9, Ten, Jack, Queen, King, Ace.
  2. One Pair: Two cards of the same value.
  3. Two Pairs: Two different pairs.
  4. Three of a Kind: Three cards of the same value.
  5. Straight: All cards are consecutive values.
  6. Flush: All cards of the same suit.
  7. Full House: Three of a kind and a pair.
  8. Four of a Kind: Four cards of the same value.
  9. Straight Flush: All cards are consecutive values of same suit.
  10. Royal Flush: Ten, Jack, Queen, King, Ace of same suit.