Skip to content

juansneak/development-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Development Test - ComparaOnline

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published