private void CheckForFlush(GameCard firstCard, GameCard secondCard, GameCard[] cardsOfSameSuitOnTable, IPlayer player)
        {
            var allcardsOnTableAndPlayers = new GameCard[cardsOfSameSuitOnTable.Length + 2];

            allcardsOnTableAndPlayers[0] = firstCard;
            allcardsOnTableAndPlayers[1] = secondCard;

            var highestCardFromTable = cardsOfSameSuitOnTable.OrderByDescending(c => c.Rank).First();

            for (int i = 2, counter = 0; i < allcardsOnTableAndPlayers.Length; i++, counter++)
            {
                allcardsOnTableAndPlayers[i] = cardsOfSameSuitOnTable[counter];
            }
            var maxCardValue = allcardsOnTableAndPlayers.OrderByDescending(c => c.Rank).First();

            if (cardsOfSameSuitOnTable.Length == 3)
            {
                // check if the 3 cards on the table with the same suit are the same suit with the player's cards
                // takes the most high card by rank and multiplies *500
                if (firstCard.Suit == secondCard.Suit && firstCard.Suit == highestCardFromTable.Suit)
                {
                    player.PokerHandMultiplier = 5;
                    player.CardPower           = maxCardValue.Rank + player.PokerHandMultiplier * 100;
                }
                // check if one of the player cards match by suit with the cards on the table
            }
            else if (cardsOfSameSuitOnTable.Length == 4 &&
                     (firstCard.Suit == highestCardFromTable.Suit || secondCard.Suit == highestCardFromTable.Suit))
            {
                if (firstCard.Suit == highestCardFromTable.Suit)
                {
                    var highCardByRank = firstCard.Suit > highestCardFromTable.Suit ? firstCard : highestCardFromTable;
                    player.PokerHandMultiplier = 5;
                    player.CardPower           = highCardByRank.Rank + player.PokerHandMultiplier * 100;
                }
                if (secondCard.Suit == highestCardFromTable.Suit && secondCard.Rank > firstCard.Rank)
                {
                    var highCardByRank = secondCard.Suit > highestCardFromTable.Suit ? secondCard : highestCardFromTable;
                    player.PokerHandMultiplier = 5;
                    player.CardPower           = highCardByRank.Rank + player.PokerHandMultiplier * 100;
                }
            }

            //check if player's cards match by suit with card on table if so takes the strongest by power and finds CardPower
            //else takes the strongerst card from the table
            else if (cardsOfSameSuitOnTable.Length == 5)
            {
                if (firstCard.Suit == highestCardFromTable.Suit || secondCard.Suit == highestCardFromTable.Suit)
                {
                    if (firstCard.Suit == highestCardFromTable.Suit)
                    {
                        var highCardByRank = firstCard.Suit > highestCardFromTable.Suit ? firstCard : highestCardFromTable;
                        player.PokerHandMultiplier = 5;
                        player.CardPower           = highCardByRank.Rank + player.PokerHandMultiplier * 100;
                    }
                    if (secondCard.Suit == highestCardFromTable.Suit && secondCard.Rank > firstCard.Rank)
                    {
                        var highCardByRank = secondCard.Suit > highestCardFromTable.Suit ? secondCard : highestCardFromTable;
                        player.PokerHandMultiplier = 5;
                        player.CardPower           = highCardByRank.Rank + player.PokerHandMultiplier * 100;
                    }
                }
                else
                {
                    player.PokerHandMultiplier = 5;
                    player.CardPower           = maxCardValue.Rank + player.PokerHandMultiplier * 100;
                }
            }
        }
        private void CheckForFlush(GameCard firstCard, GameCard secondCard, GameCard[] cardsOfSameSuitOnTable, IPlayer player)
        {
            var allcardsOnTableAndPlayers = new GameCard[cardsOfSameSuitOnTable.Length + 2];
            allcardsOnTableAndPlayers[0] = firstCard;
            allcardsOnTableAndPlayers[1] = secondCard;

            var highestCardFromTable = cardsOfSameSuitOnTable.OrderByDescending(c => c.Rank).First();

            for (int i = 2, counter = 0; i < allcardsOnTableAndPlayers.Length; i++, counter++)
            {
                allcardsOnTableAndPlayers[i] = cardsOfSameSuitOnTable[counter];
            }
            var maxCardValue = allcardsOnTableAndPlayers.OrderByDescending(c => c.Rank).First();

            if (cardsOfSameSuitOnTable.Length == 3)
            {
                // check if the 3 cards on the table with the same suit are the same suit with the player's cards
                // takes the most high card by rank and multiplies *500
                if (firstCard.Suit == secondCard.Suit && firstCard.Suit == highestCardFromTable.Suit)
                {
                    player.PokerHandMultiplier = 5;
                    player.CardPower = maxCardValue.Rank + player.PokerHandMultiplier * 100;
                }
                // check if one of the player cards match by suit with the cards on the table
            }
            else if (cardsOfSameSuitOnTable.Length == 4 &&
                     (firstCard.Suit == highestCardFromTable.Suit || secondCard.Suit == highestCardFromTable.Suit))
            {
                if (firstCard.Suit == highestCardFromTable.Suit)
                {
                    var highCardByRank = firstCard.Suit > highestCardFromTable.Suit ? firstCard : highestCardFromTable;
                    player.PokerHandMultiplier = 5;
                    player.CardPower = highCardByRank.Rank + player.PokerHandMultiplier * 100;
                }
                if (secondCard.Suit == highestCardFromTable.Suit && secondCard.Rank > firstCard.Rank)
                {
                    var highCardByRank = secondCard.Suit > highestCardFromTable.Suit ? secondCard : highestCardFromTable;
                    player.PokerHandMultiplier = 5;
                    player.CardPower = highCardByRank.Rank + player.PokerHandMultiplier * 100;
                }
            }

            //check if player's cards match by suit with card on table if so takes the strongest by power and finds CardPower 
            //else takes the strongerst card from the table
            else if (cardsOfSameSuitOnTable.Length == 5)
            {
                if (firstCard.Suit == highestCardFromTable.Suit || secondCard.Suit == highestCardFromTable.Suit)
                {
                    if (firstCard.Suit == highestCardFromTable.Suit)
                    {
                        var highCardByRank = firstCard.Suit > highestCardFromTable.Suit ? firstCard : highestCardFromTable;
                        player.PokerHandMultiplier = 5;
                        player.CardPower = highCardByRank.Rank + player.PokerHandMultiplier * 100;
                    }
                    if (secondCard.Suit == highestCardFromTable.Suit && secondCard.Rank > firstCard.Rank)
                    {
                        var highCardByRank = secondCard.Suit > highestCardFromTable.Suit ? secondCard : highestCardFromTable;
                        player.PokerHandMultiplier = 5;
                        player.CardPower = highCardByRank.Rank + player.PokerHandMultiplier * 100;
                    }
                }
                else
                {
                    player.PokerHandMultiplier = 5;
                    player.CardPower = maxCardValue.Rank + player.PokerHandMultiplier * 100;
                }
            }
        }