Hi,
I have a serious problem to understand to code a task.
we have a set of 5 cards like:
nine of hearts
queen of hearts
ten of hearts
jack of hearts
king of hearts
we are ask to code the task according to the following characteristic:
straight flush (5 cards in sequence*, all of the same suit) has a value of 10 points.
*sequence is 2,3,4,5,6,7,8,9,10,jack,queen,king with ace considered as either before 2 or after king as needed.
The set above has a value of 10 pts.
I have suceeded to count the number of suits, but how can I work out the sequence part??
Can help me please?
B
I have a serious problem to understand to code a task.
we have a set of 5 cards like:
nine of hearts
queen of hearts
ten of hearts
jack of hearts
king of hearts
we are ask to code the task according to the following characteristic:
straight flush (5 cards in sequence*, all of the same suit) has a value of 10 points.
*sequence is 2,3,4,5,6,7,8,9,10,jack,queen,king with ace considered as either before 2 or after king as needed.
The set above has a value of 10 pts.
I have suceeded to count the number of suits, but how can I work out the sequence part??
Can help me please?
B