Skip to content

Latest commit

 

History

History

pokerhand-straight-or-not

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Texas Hold-em!

Your task is to determine if the cards in the list makes up a straight (five cards of sequential rank) or not. The cards will always have values ranging from 2-14, where 14 is the ace.

Be aware the ace (14) also should count as value 1!

The number of cards will vary, but will never be more than 7 (the board (5) + player hand (2))

Examples:

straight: 9-10-11-12-13

straight: 14-2-3-4-5

straight: 2-7-8-5-10-9-11

not straight: 7-8-12-13-14