private double[] CalculateChances(int amountOfPlayers) { chances = new Chances(allCards); bool isPair = currentHands[1]; bool isTwoPair = currentHands[2]; bool isThreeOfAKind = currentHands[3]; bool isStraight = currentHands[4]; bool isFlush = currentHands[5]; bool isFullHouse = currentHands[6]; bool isFourOfAKind = currentHands[7]; bool isStraightFlush = currentHands[8]; double pair = isPair ? 100.0 : chances.CalculateChanceForPair(amountOfPlayers, allCards); double twoPair = isTwoPair ? 100.0 : chances.CalculateChanceForTwoPair(amountOfPlayers, allCards); double threeOfAKind = isThreeOfAKind ? 100.0 : chances.CalculateChanceForThreeOfAKind(amountOfPlayers, isPair, isTwoPair, allCards); double straight = isStraight ? 100.0 : chances.CalculateChanceForStraight(amountOfPlayers, allCards); double flush = isFlush ? 100.0 : chances.CalculateChanceForFlush(amountOfPlayers, allCards); double fullHouse = isFullHouse ? 100 : chances.CalculateChanceForFullHouse(amountOfPlayers, allCards); double fourOfAKind = isFourOfAKind ? 100 : chances.CalculateChanceForFourOfAKind(amountOfPlayers, isThreeOfAKind, allCards); double straightFlush = isStraightFlush ? 100 : chances.CalculateChanceForStraightFlush(amountOfPlayers, allCards); double[] arrayChances = { pair, twoPair, threeOfAKind, straight, flush, fullHouse, fourOfAKind, straightFlush }; return(arrayChances); }