I am writing a Poker program in Prolog and I your help. I want the computer to check, what kind of hands he could still get with the cards that are already lying on the table and in his hand. To do this, I need to fill in the remaining cards with cards from the deck.
Example: the flop (3 cards) is already on the table, 2 cards are in the players hands, 2 cards are left to draw. That means that the computer needs to check what hands he could get by combining his 2 hidden cards and the 3 open cards with 2 other cards, not yet drawn (including the other players cards, because he does not know them, this is no problem to do for me).
So, if he needs 2 cards for a straight, the computer should be able to ckeck if there are 2 cards left in that pool that fulfill the condition.
Since I already have the rules for the hands written down, all I have left to do is write a rule that returns to me the cards already in the hand of the computer and on the table, plus x cards from the pool. And this rule needs to be able to return EVERY possible combination of these cards (not all at once, though).
The list of possible remaining cards would look like this: list = [card(Color,Value),card(Color,Value),...]
Does anybode here have an Idea about how to do this?