A simple application to determine the type of hand in poker dealt to a player https://en.wikipedia.org/wiki/List_of_poker_hands
This requires ES6 javascript and node 8 to run. There are no external dependencies. There are some dev dependencies
const checkHand = require('./src/poker-hand')
console.log(checkHand(['11-S', '10-S', '9-S', '8-S', '7-S'])) // straight flush
S : Spades
H : Hearts
D : Diamond
C : Clubs
A single card is denoted by the string '11-S'
. This is a Jack of Spades
- Straight flush :e.g.
['11-S', '10-S', '9-S', '8-S', '7-S']
- Four of a kind : e.g.
['11-S', '11-D', '11-H', '11-C', '10-S']
- full house :
- flush :
- straight
- three of a kind :
- two pair :
- one pair :
- high card :
This project is inspired by the book Refactoring Javascript I want to compare my implementation to the one in the book Also I have plans to work on a project to compare two poker hands and find out the winner.