I'm trying to find an efficient solution for the following question:
Terminology:
Rank: 1-13 where 11=Jack,12=Queen,13=King
Suit: H=Hearts,C=Clubs,D=Diamonds,S=Spades
"WishCard": a card that can wear any Rank/Suit according to the player's wish without duplicate cards.
Given 2 to 7 cards, and at least 0 to 7 of them are defined as "WishCard", what are the best cards combination a player may have at a specific given time.
Examples:
Stage: Pre-Flop
Hand[4C,*] -> Hand[4C,4H] | Pair
Stage: Flop
Hand[4C,*], Shared[*,10H,5C] -> Hand[4C,10C], Shared[10D,10H,5C] | 10 Three of a kind
Stage: Turn
Hand[4C,*], Shared[*,10H,5C,1S] -> Hand[4C,1C], Shared[1D,10H,5C,1S] | Ace Three of a kind
Stage: River
Hand[4C,*], Shared[*,10H,5C,1S,6C] -> Hand[4C,8C], Shared[7C,10H,5C,1S,6C] | 4C-8C Straight Flush
I feel like brute forcing it will take for ever. is there a faster way to calculate it?