Here in Russia, we have a little-known card game with the name, when translated directly, means Rooster.
The cards used are two full 54-card decks of playing cards from 2 through aces, with jokers. The game for each player divides into two stages. In the first stage, each player has 14 cards dealt, and with those cards has to get 51 or more points with card combinations.
1.Each combination has to be at least three cards long, with no cards repeating, and can be either:
- A combination of cards of the same value (not points), for example:
Ace of spades, ace of hearts, ace of clubs Six of hearts, six of clubs, six of diamonds, six of spades
- A combination of cards that are in a row, like a straight in poker, examples:
Jack of clubs, queen of clubs, king of spades, ace of hearts Seven of spades, eight of diamonds, nine of clubs Ace of diamonds, two of clubs, three of hearts, four of diamonds, five of spades
- Your hand score is calculated by the sum of points in every card combination according to the chart below:
2-10: according to the cards face value for each card (For example, Three of spades is 3 points) Jack,Queen,King: 10 points for each card Ace: 1 point if used before a Two, otherwise 11 points for each card Joker: 0 points
Jokers can substitute any card in a combination, but cannot be used more than once in each combination. The cards they substitute cannot be used again in the same combination.
Cards cannot be used twice. If you used a card, you can't then use it in a different combination
But remember, since the deck is two 54-card decks, duplicates of one card are possible, and, if duplicates are in a hand, using one card will not forbid you from using the other duplicate.
Taking a hand of 14 cards, output one of the possible things:
- A truthy value if the cards given can form combinations in such a way that your hand score is more or equal than 51
- A falsy value if your hand does not reach the score of 51
Each card is given in a format VS, where:
- V is the face value. Possible values: [2,3,4,5,6,7,8,9,T,J,Q,K,A]
- S is the suit of a card. Possible values: [S,H,D,C,J] A joker will be represented as JJ
Your input may be in any form you wish, as long as each card values are not separated. For example:
- A list of cards. (['TS','3H','JJ','9C',etc...])
- Cards separated from each other with a whitespace. (TS 3H JJ 9C etc...)
- A Truthy/Falsy
- A 1/0
This is codegolf, so lowest bytecount for each language wins! I hope the rules are clear, and good luck!
edit 1: got mixed up in terminology