Portuguese card game probabilities with a 40 card deck I'm working on a Portuguese card game for 4 players for a personal java project, and need help modelling. For this game, the 8's, 9's, and 10's are removed, leaving the deck with 40 cards, 10 for each suit. In each round, each player plays 1 card, in their turn. For a given player's turn, the probability I'm trying to calculate is if at least 1 player who plays after the given player's turn has at least 1 card of suit x in their hand, while having no cards of suit y.
Looking at an example, 
                player 1
                A♠ 7♥ K♥

player 2                        player 4
    A♥                              6♠
    J♥                              2♠
    7♠                              6♥

                player 3
                A♣ 2♥ K♦

Suppose player 3 is the first to play in this round, and suit x is ♠ (defined in the beginning of the game, it's the "trump suit"). For y = ♣ there is at least 1 player with at least 1 ♠, while having no ♣. For y = ♥, the opposite is true, all players have ♥, regardless of having ♠ or not.
The question arises from the rule that trump cards beat any card, but you have to play the same suit as the first player in the round, if you can. Players know how many cards from each suit remain because they remember which cards have been played.
I think that's all the relevant information, if something is not clear, I'm happy to explain.
The game in question is Sueca
 A: I ended up with this recursive function, which seems to work. It generates all possible distributions of x cards by p players. p == 1 is the exit condition. xp contains the assumptions. The function counts bad cases (1 player doesn't have the intended suit) and good cases (all players have it).
private static void calcCases(int x, ArrayList<Integer> xp, int p, AtomicInteger goodCases, AtomicInteger badCases) {
    if(p == 1) {
        xp.add(x);
        boolean badCase = false;
        for(Integer xpp : xp) {
            if(xpp == 0) {
                badCase = true;
                break;
            }
        }
        if(badCase) {
            badCases.incrementAndGet();
        } else {
            goodCases.incrementAndGet();
        }
        xp.remove(Integer.valueOf(x));
        return;
    }
    for(int xpp = 0; xpp < x; xpp++) {
        xp.add(xpp);
        calcCases(x - xpp, xp, p - 1, goodCases, badCases);
        xp.remove(Integer.valueOf(xpp));
    }
}

I'm sure there's a simpler way, but for now I'll use this.
