Beispiel #1
0
 // Gets and sets the hand card bonus status.
 public void SetCardBonusStatus(GameSimulationInput.EnumCardBonus bonus_status)
 {
     _cardBonusStatus = bonus_status;
 }
Beispiel #2
0
        // Gets the hand enum value e.g. Hard 13.
        public HandEnum GetHandEnumValue(bool cannot_split_4s_5s_10s, bool cannot_split_aces)
        {
            _CANNOT_SPLIT_4s_5s_10s_OPTION = cannot_split_4s_5s_10s;
            _CANNOT_SPLIT_ACES             = cannot_split_aces;

            int value     = 0,
                ace_count = 0;

            // Gets the count of all the aces in the hand and adds the value of the hand
            foreach (Card card in handCards)
            {
                if (card.GetIsAce())            // checks if the card is an ace
                {
                    ace_count++;
                }
                else
                {
                    value += card.GetCardValue();
                }
            }
            for (int i = 0; i < ace_count; i++)
            {
                if (value + 11 > 21)
                {
                    value   += 1; // ace value as 1
                    handType = HandTypeEnum.HARD;
                }
                else  // ace value as 11
                {
                    value   += 11;
                    handType = HandTypeEnum.SOFT;
                }
            }
            // After adding the card values, the check for busting is done.
            if (value > 21)
            {
                handType = HandTypeEnum.BUST;
            }
            else
            {                                            // If the hand is not bust, check for the hand type
                // Check if the Hand is a Luck777 Hand  i.e. 7, 7, 7.
                if (value == 21 && handCards.Count == 3) // check if there are 3 cards and total 21
                {
                    // Check if all three cards are 7's;
                    if (handCards[0].GetCardFace() == Card.CardFaceENUM.Seven && handCards[1].GetCardFace() == Card.CardFaceENUM.Seven &&
                        handCards[2].GetCardFace() == Card.CardFaceENUM.Seven)
                    {
                        _isLucky777 = true;
                    }
                }
                // Checks to see if the Hand is a Blackjack.
                if (value == 21 && handCards.Count == 2)
                {
                    _hasBlackjack = true;
                    if (handCards[0].GetCardSuit() == handCards[1].GetCardSuit())
                    {
                        _isSuitedBlackJack = true;
                    }
                }
                // If there are no aces, the value will be a hard value
                if (ace_count == 0)
                {
                    handType = HandTypeEnum.HARD;
                }

                int numbef_of_cards = handCards.Count;
                // Checks for Card Bonus's
                if (numbef_of_cards >= 5)
                {
                    if (numbef_of_cards == 5)                    // If 5 card trick pays 3to2.
                    {
                        _cardBonusStatus = GameSimulationInput.EnumCardBonus.Five_Card_Trick_Bonus;
                    }
                    if (numbef_of_cards == 6)                    // If 6 card trick pays 3to2.
                    {
                        _cardBonusStatus = GameSimulationInput.EnumCardBonus.Six_Card_Trick_Bonus;
                    }
                    if (numbef_of_cards == 7)                    // If 7 card trick pays 3to2.
                    {
                        _cardBonusStatus = GameSimulationInput.EnumCardBonus.Seven_Card_Trick_Bonus;
                    }
                    if (value == 21 && numbef_of_cards == 5)     // If 21 and 5 card trick pays 2to1
                    {
                        _cardBonusStatus = GameSimulationInput.EnumCardBonus.Five_Card_21_Pays2to1;
                    }
                    if (value == 21 && numbef_of_cards > 5)      // If 21 and 5+ card trick pays 2to1
                    {
                        _cardBonusStatus = GameSimulationInput.EnumCardBonus.Five_Above_Card_21_Pays2to1;
                    }
                }

                // Checks the hand for pairs (if there is 2 cards)
                if (handCards.Count == 2 && handCards[0].GetCardValue() == handCards[1].GetCardValue())
                {
                    handType = HandTypeEnum.PAIR;

                    // If the cannot split 4s, 5s and 10s option is selected, it sets hands to _cannotSplitHand to True;
                    if (_CANNOT_SPLIT_4s_5s_10s_OPTION == true)
                    {
                        if (value == 8 || value == 10 || value == 20)
                        {
                            _cannotSplitHand = true;
                        }
                    }
                    // If the cannot split aces option is selected, it sets hands to _cannotSplitHand to True;
                    if (_CANNOT_SPLIT_ACES == true)
                    {
                        if (handCards[0].GetCardFace().Equals(Card.CardFaceENUM.Ace) && handCards[1].GetCardFace().Equals(Card.CardFaceENUM.Ace))
                        {
                            _cannotSplitHand = true;
                        }
                    }

                    /* If this hand is to be Split in the strategy (however the split limit is reached) then the value will be turned to a Hard
                     * E.g. Pairs of 8's will become Hard 16 -> input as a strategy parameter. Also Pair of Ace's will become Hard 12.
                     * ***/
                    if (_splitLimitReached == true || _cannotSplitHand == true)
                    {
                        /* If the pair is an Ace, the value will equal a total of 1+1 = 2. Therefore there will not be a HardEnum Match.
                         * This is because the value of two Ace's should be 12 (11+1). Therefore we set the value to 12.
                         * This will change from a Pair Enum to a Hard Enum.
                         * ***/
                        if (value == 2)
                        {
                            value    = 13;
                            handType = HandTypeEnum.SOFT;
                            if (debug)
                            {
                                MessageBox.Show("SPLIT LIMIT REACHED: Therefore - Pair of Aces, treated as Soft 13.");
                            }
                        }

                        /* If the pair is a pair of Two's, the value will equal 2+2 =4. Therefore there will not be a HardEnum Match.
                         * In this rare case: What should be a Hard4 will be treated the same as a Hard 5.
                         * Changng the Pair enum to a Hard enum.
                         * ***/
                        else if (value == 4)
                        {
                            value    = 5;
                            handType = HandTypeEnum.HARD;
                            if (debug)
                            {
                                MessageBox.Show("SPLIT LIMIT REACHED: Therefore - Pair of Fours, treated as Hard 5.");
                            }
                        }

                        else
                        {
                            handType = HandTypeEnum.HARD;
                        }
                    }
                }
            }



            // returns the Hand Enum (e.g. HARD_FIVE) depending on the type (hard, soft, pair) of hand
            switch (handType)
            {
            case HandTypeEnum.HARD:
                switch (value)
                {
                case 5:
                    return(HandEnum.HARD_FIVE);

                case 6:
                    return(HandEnum.HARD_SIX);

                case 7:
                    return(HandEnum.HARD_SEVEN);

                case 8:
                    return(HandEnum.HARD_EIGHT);

                case 9:
                    return(HandEnum.HARD_NINE);

                case 10:
                    return(HandEnum.HARD_TEN);

                case 11:
                    return(HandEnum.HARD_ELEVEN);

                case 12:
                    return(HandEnum.HARD_TWELVE);

                case 13:
                    return(HandEnum.HARD_THIRTEEN);

                case 14:
                    return(HandEnum.HARD_FOURTEEN);

                case 15:
                    return(HandEnum.HARD_FIFTEEN);

                case 16:
                    return(HandEnum.HARD_SIXTEEN);

                case 17:
                    return(HandEnum.HARD_SEVENTEEN);

                case 18:
                    return(HandEnum.HARD_EIGHTEEN);

                case 19:
                    return(HandEnum.HARD_NINTEEN);

                case 20:
                    return(HandEnum.HARD_TWENTY);

                case 21:
                    return(HandEnum.HARD_TWENTYONE);

                default:
                    MessageBox.Show("ERROR DETECTED: In the HARD hand enum");
                    break;
                }
                break;

            case HandTypeEnum.SOFT:
                switch (value)
                {
                case 13:
                    return(HandEnum.SOFT_THIRTEEN);

                case 14:
                    return(HandEnum.SOFT_FOURTEEN);

                case 15:
                    return(HandEnum.SOFT_FIFTEEN);

                case 16:
                    return(HandEnum.SOFT_SIXTEEN);

                case 17:
                    return(HandEnum.SOFT_SEVENTEEN);

                case 18:
                    return(HandEnum.SOFT_EIGHTEEN);

                case 19:
                    return(HandEnum.SOFT_NINETEEN);

                case 20:
                    return(HandEnum.SOFT_TWENTY);

                case 21:
                    _hasBlackjack = true;
                    return(HandEnum.SOFT_TWENTYONE);

                default:
                    MessageBox.Show("ERROR DETECTED: In the SOFT hand enum");
                    break;
                }
                break;

            case HandTypeEnum.PAIR:
                switch (handCards[0].GetCardFace())
                {
                case Card.CardFaceENUM.Two:
                    return(HandEnum.PAIR_TWO);

                case Card.CardFaceENUM.Three:
                    return(HandEnum.PAIR_THREE);

                case Card.CardFaceENUM.Four:
                    return(HandEnum.PAIR_FOUR);

                case Card.CardFaceENUM.Five:
                    return(HandEnum.PAIR_FIVE);

                case Card.CardFaceENUM.Six:
                    return(HandEnum.PAIR_SIX);

                case Card.CardFaceENUM.Seven:
                    return(HandEnum.PAIR_SEVEN);

                case Card.CardFaceENUM.Eight:
                    return(HandEnum.PAIR_EIGHT);

                case Card.CardFaceENUM.Nine:
                    return(HandEnum.PAIR_NINE);

                case Card.CardFaceENUM.Ten:
                    return(HandEnum.PAIR_TEN);

                case Card.CardFaceENUM.Jack:
                    return(HandEnum.PAIR_TEN);

                case Card.CardFaceENUM.Queen:
                    return(HandEnum.PAIR_TEN);

                case Card.CardFaceENUM.King:
                    return(HandEnum.PAIR_TEN);

                case Card.CardFaceENUM.Ace:
                    return(HandEnum.PAIR_ACE);

                default:
                    MessageBox.Show("ERROR DETECTED: In the PAIR hand enum");
                    break;
                }
                break;

            case HandTypeEnum.BUST:
                _isBust = true;
                // If bust, it will return Bust
                return(HandEnum.BUST);
            }
            MessageBox.Show("The hand composition was not recognised: Therefore returned BUST as default.");
            return(HandEnum.BUST);
        }
Beispiel #3
0
        // The constructor for the GameSimulationReport, stores all of the local report variables and creates the game report. Based on the Game Simulation Inputs (GSI) and Game Simulation output.
        public GameSimulationReport(decimal initial_balance, decimal final_balance, decimal flat_bet_amount, int hands_simulated,
                                    int total_hands_to_simulate, int total_decks, int total_times_shuffled, int total_hands_won, int total_hands_lost,
                                    int total_hands_draw, int total_hands_surrendered, int total_hands_bj_natural_won, bool shuffle_after_each_hand, double deck_deal_percentage,
                                    int split_limit, bool cannot_split_4s_5s_10s, bool cannot_split_aces, bool hit_split_aces_option, bool double_after_split,
                                    GameSimulationInput.EnumDoubleOn on_double_option, GameSimulationInput.EnumCardBonus card_bonus_option, bool lucky_777_option,
                                    bool suited_bj_pays_2to1_option, GameSimulationInput.EnumBlackJackPays bj_pays_option, PlayerStrategy player_strategy,
                                    DealerStrategy dealer_strategy)
        {
            #region - Sets all local variables -
            decimal yield = (decimal)((final_balance - initial_balance) / (decimal)(initial_balance));
            this._Fitness_Yield  = Math.Round(yield, 5);
            this._InitialBalance = initial_balance;
            this._FinalBalance   = final_balance;
            this._FlatBetAmount  = flat_bet_amount;
            // MS - money staked, MR - money returned, MR-MS is a net profit(or loss), yield = ((MR-MS)/MS)*100 (%).

            this._Profit_Loss                = final_balance - initial_balance;
            this._Hands_Simulated            = hands_simulated;
            this._Total_Hands_To_Simulate    = total_hands_to_simulate;
            this._Total_Decks                = total_decks;
            this._Total_Times_Shuffled       = total_times_shuffled;
            this._Total_Hands_Won            = total_hands_won;
            this._Total_Hands_Lost           = total_hands_lost;
            this._Total_Hands_Draw           = total_hands_draw;
            this._Total_Hands_Surrendered    = total_hands_surrendered;
            this._Total_Hands_BJ_Natural_Won = total_hands_bj_natural_won;

            this._SHUFFLE_AFTER_EACH_HAND   = shuffle_after_each_hand;
            this._DECK_DEAL_PERCENTAGE      = deck_deal_percentage;
            this._SPLIT_LIMIT               = split_limit;
            this._CANNOT_SPLIT_4s_5s_10s    = cannot_split_4s_5s_10s;
            this._CANNOT_SPLIT_ACES         = cannot_split_aces;
            this._HIT_SPLIT_ACES_OPTION     = hit_split_aces_option;
            this._DOUBLE_AFTER_SPLIT        = double_after_split;
            this._ON_DOUBLE_OPTION          = on_double_option;
            this._CARD_BONUS_OPTION         = card_bonus_option;
            this._LUCKY_777_OPTION          = lucky_777_option;
            this._SUITED_BJ_PAYS_2to1_OPTON = suited_bj_pays_2to1_option;
            this._BJ_PAYS_OPTION            = bj_pays_option;
            this._player_strategy           = player_strategy;
            this._dealer_strategy           = dealer_strategy;
            #endregion

            StringBuilder ReportString = new StringBuilder();
            // Constructs and creates the Game Simulation output report. Converting the game output (variables) to a string format.
            ReportString.AppendLine("--------------------------------------------------------------------------------------------------------------------------------------------");
            ReportString.AppendLine("---------------------------------------------------- GAME SIMULATION REPORT ----------------------------------------------------");
            ReportString.AppendLine("--------------------------------------------------------------------------------------------------------------------------------------------");
            ReportString.AppendLine("| ");
            ReportString.AppendLine("| Yield (%): " + _Fitness_Yield);
            ReportString.AppendLine("| Profit/Loss: " + _Profit_Loss);
            ReportString.AppendLine("--------------------------------------------------------------------------------------------------------------------------------------------");
            ReportString.AppendLine("| ");
            ReportString.AppendLine("| Initial Balance: " + _InitialBalance);
            ReportString.AppendLine("| ");
            ReportString.AppendLine("| Final Balance: " + _FinalBalance);
            ReportString.AppendLine("|  ");
            ReportString.AppendLine("| Flat Bet Amount: " + _FlatBetAmount);
            ReportString.AppendLine("--------------------------------------------------------------------------------------------------------------------------------------------");
            ReportString.AppendLine("|  ");
            ReportString.AppendLine("| Number of Hands Simulated: (" + _Hands_Simulated + "/" + _Total_Hands_To_Simulate + ")");
            ReportString.AppendLine("|  ");
            ReportString.AppendLine("| Number of Decks: " + _Total_Decks);
            ReportString.AppendLine("|  ");
            ReportString.AppendLine("| Times Shuffled: " + _Total_Times_Shuffled);
            ReportString.AppendLine("--------------------------------------------------------------------------------------------------------------------------------------------");
            ReportString.AppendLine("|  ");
            ReportString.AppendLine("| Hands Won: " + _Total_Hands_Won);
            ReportString.AppendLine("|  ");
            ReportString.AppendLine("| Hands Lost: " + _Total_Hands_Lost);
            ReportString.AppendLine("|  ");
            ReportString.AppendLine("| Hands Drawn: " + _Total_Hands_Draw);
            ReportString.AppendLine("|  ");
            ReportString.AppendLine("| Hands Surrendered: " + _Total_Hands_Surrendered);
            ReportString.AppendLine("|  ");
            ReportString.AppendLine("| Blackjacks Won: " + _Total_Hands_BJ_Natural_Won);
            ReportString.AppendLine("________________________________________________________________________________________________________________________________________ ");
            ReportString.AppendLine(" ");
            ReportString.AppendLine(" ");

            // Constructs and creates the Game Simulation Input rules. Converting the input rules (variables) to a string format.
            ReportString.AppendLine("--------------------------------------------------------------------------------------------------------------------------------------------");
            ReportString.AppendLine("------------------------------------------------------GAME SIMULATION RULES ------------------------------------------------------");
            ReportString.AppendLine("--------------------------------------------------------------------------------------------------------------------------------------------");

            // Creates a string for the value yes or no (bool values).
            string yesORnoORenum = "";

            // Sets the bool value to a yes or no
            if (_SHUFFLE_AFTER_EACH_HAND == true)
            {
                yesORnoORenum = "yes";
            }
            else
            {
                yesORnoORenum = "no";
            }
            ReportString.AppendLine("|  ");
            ReportString.AppendLine("| Shuffle after each hand: " + yesORnoORenum);
            ReportString.AppendLine("|  ");
            ReportString.AppendLine("| % Dealt until shuffle: " + _DECK_DEAL_PERCENTAGE + "%");
            ReportString.AppendLine("--------------------------------------------------------------------------------------------------------------------------------------------");
            ReportString.AppendLine("|  ");
            ReportString.AppendLine("| Split Limit: " + _SPLIT_LIMIT);
            ReportString.AppendLine("|  ");

            // Converts the bool value to a yes or no
            if (_CANNOT_SPLIT_4s_5s_10s == true)
            {
                yesORnoORenum = "no";
            }
            else
            {
                yesORnoORenum = "yes";
            }
            ReportString.AppendLine("| Split 4s, 5s or 10s: " + yesORnoORenum);
            ReportString.AppendLine("|  ");

            // Converts the bool value to a yes or no
            if (_CANNOT_SPLIT_ACES == true)
            {
                yesORnoORenum = "no";
            }
            else
            {
                yesORnoORenum = "yes";
            }
            ReportString.AppendLine("| Split Aces: " + yesORnoORenum);
            ReportString.AppendLine(" ");

            // Converts the bool value to a yes or no
            if (_HIT_SPLIT_ACES_OPTION == true)
            {
                yesORnoORenum = "yes";
            }
            else
            {
                yesORnoORenum = "no";
            }
            ReportString.AppendLine("| Hit Split Aces: " + yesORnoORenum);
            ReportString.AppendLine("--------------------------------------------------------------------------------------------------------------------------------------------");
            ReportString.AppendLine("|  ");

            // Converts the bool value to a yes or no
            if (_DOUBLE_AFTER_SPLIT == true)
            {
                yesORnoORenum = "yes";
            }
            else
            {
                yesORnoORenum = "no";
            }
            ReportString.AppendLine("| Double After Split: " + yesORnoORenum);
            ReportString.AppendLine("|  ");

            // Converts the enum value to an appropriate output message (string)
            switch (_ON_DOUBLE_OPTION)
            {
            case GameSimulationInput.EnumDoubleOn.Any_2_Cards:
                yesORnoORenum = "any 2 cards";
                break;

            case GameSimulationInput.EnumDoubleOn.HardORSoft_9to11:
                yesORnoORenum = "hard/soft values 9-11";
                break;

            case GameSimulationInput.EnumDoubleOn.Hard_9to11:
                yesORnoORenum = "hard values 9-11";
                break;

            default:
                MessageBox.Show("Error, located in creating the simulation report. Double On Enum.");
                yesORnoORenum = "any 2 cards";
                break;
            }
            ReportString.AppendLine("| Double Option: " + yesORnoORenum);
            ReportString.AppendLine("--------------------------------------------------------------------------------------------------------------------------------------------");
            ReportString.AppendLine("|  ");

            // Converts the enum value to an appropriate output message (string)
            switch (_CARD_BONUS_OPTION)
            {
            case GameSimulationInput.EnumCardBonus.Five_Above_Card_21_Pays2to1:
                yesORnoORenum = "5+ card trick 21 (pays 2:1)";
                break;

            case GameSimulationInput.EnumCardBonus.Five_Card_21_Pays2to1:
                yesORnoORenum = "5 card trick 21 (pays 2:1)";
                break;

            case GameSimulationInput.EnumCardBonus.Five_Card_Trick_Bonus:
                yesORnoORenum = "5 card trick bonus (pays 3:2)";
                break;

            case GameSimulationInput.EnumCardBonus.No_Card_Trick_Bonus:
                yesORnoORenum = "no card trick bonus";
                break;

            case GameSimulationInput.EnumCardBonus.Seven_Card_Trick_Bonus:
                yesORnoORenum = "7 card trick bonus (pays 3:2)";
                break;

            case GameSimulationInput.EnumCardBonus.Six_Card_Trick_Bonus:
                yesORnoORenum = "6 card trick bonus (pays 3:2)";
                break;

            default:
                MessageBox.Show("Error, located in creating the simulation report. Card Bonus Option Enum.");
                yesORnoORenum = "no card trick bonus";
                break;
            }
            ReportString.AppendLine("| Card Bonus Option: " + yesORnoORenum);
            ReportString.AppendLine("|  ");

            // Converts the bool value to enabled or disabled
            if (_LUCKY_777_OPTION == true)
            {
                yesORnoORenum = "enabled";
            }
            else
            {
                yesORnoORenum = "disabled";
            }
            ReportString.AppendLine("| Lucky 777: " + yesORnoORenum);
            ReportString.AppendLine("|  ");

            // Converts the bool value to enabled or disabled
            if (_SUITED_BJ_PAYS_2to1_OPTON == true)
            {
                yesORnoORenum = "enabled";
            }
            else
            {
                yesORnoORenum = "disabled";
            }
            ReportString.AppendLine("| Suited Blackjack pays 2-1: " + yesORnoORenum);
            ReportString.AppendLine("|  ");

            // Converts the enum value to an appropriate output message (string)
            switch (_BJ_PAYS_OPTION)
            {
            case GameSimulationInput.EnumBlackJackPays.Pays1to1:
                yesORnoORenum = "1:1";
                break;

            case GameSimulationInput.EnumBlackJackPays.Pays2to1:
                yesORnoORenum = "2:1";
                break;

            case GameSimulationInput.EnumBlackJackPays.Pays3to2:
                yesORnoORenum = "3:2";
                break;

            case GameSimulationInput.EnumBlackJackPays.Pays6to5:
                yesORnoORenum = "6:5";
                break;

            default:
                MessageBox.Show("Error, located in creating the simulation report. Card Bonus Option Enum.");
                yesORnoORenum = "3:2";
                break;
            }
            ReportString.AppendLine("--------------------------------------------------------------------------------------------------------------------------------------------");
            ReportString.AppendLine("|  ");
            ReportString.AppendLine("| Blackjack pays: " + yesORnoORenum);
            ReportString.AppendLine("________________________________________________________________________________________________________________________________________ ");
            ReportString.AppendLine(" ");
            ReportString.AppendLine(" ");

            // Constructs and creates the Player Strategy. Converting the strategy (datatable) to a string format.
            ReportString.AppendLine("--------------------------------------------------------------------------------------------------------------------------------------------");
            ReportString.AppendLine("--------------------------------------------------------- PLAYER'S STRATEGY ---------------------------------------------------------");
            ReportString.AppendLine("--------------------------------------------------------------------------------------------------------------------------------------------");

            ReportString.AppendLine("| Strategy Name: " + _player_strategy.GetStrategyName());

            DataTable dt        = _player_strategy.GetPlayerStrategyGrid();
            int       nbColumns = _player_strategy.GetNbColumns();
            #region - Converts: DataTable -> String Table -
            // Writes the strategyTable (DataTable) to a string table. Uses no loops and manually typed to ensure formatting is fully flexible.
            ReportString.AppendLine("|        |        2        |        3        |        4        |        5        |        6        |        7        |        8        |        9        |       10        |        A        |");
            ReportString.AppendLine("------------------------------------------------------------------------------------------------------------------------------------------");
            int rowIndex = 0;                  // starting row index
            //                     ("|Hard5 |  s  |  s  |  s  |  s  |  s  |  s  |  s  |  s  |   s  |   s  |");   // Test to ensure columns align
            ReportString.Append("| Hard5  |"); // Creates the opening row header
            for (int col = 0; col < nbColumns; col++)
            {
                CreateRow(ReportString, dt, rowIndex, col);
            }
            rowIndex++;
            // Creates the row ->  ("|Hard6 |  s  |  s  |  s  |  s  |  s  |  s  |  s  |  s  |   s  |   s  |");
            ReportString.Append("| Hard6  |");  // Creates the opening row header
            for (int col = 0; col < nbColumns; col++)
            {
                CreateRow(ReportString, dt, rowIndex, col);
            }
            rowIndex++;
            // Creates the row ->  ("|Hard7 |  s  |  s  |  s  |  s  |  s  |  s  |  s  |  s  |   s  |   s  |");
            ReportString.Append("| Hard7  |");  // Creates the opening row header
            for (int col = 0; col < nbColumns; col++)
            {
                CreateRow(ReportString, dt, rowIndex, col);
            }
            rowIndex++;
            // Creates the row ->  ("|Hard8 |  s  |  s  |  s  |  s  |  s  |  s  |  s  |  s  |   s  |   s  |");
            ReportString.Append("| Hard8  |");  // Creates the opening row header
            for (int col = 0; col < nbColumns; col++)
            {
                CreateRow(ReportString, dt, rowIndex, col);
            }
            rowIndex++;
            // Creates the row ->  ("|Hard9 |  s  |  s  |  s  |  s  |  s  |  s  |  s  |  s  |   s  |   s  |");
            ReportString.Append("| Hard9  |");  // Creates the opening row header
            for (int col = 0; col < nbColumns; col++)
            {
                CreateRow(ReportString, dt, rowIndex, col);
            }
            rowIndex++;
            // Creates the row ->  ("|Hard10|  s  |  s  |  s  |  s  |  s  |  s  |  s  |  s  |   s  |   s  |");
            ReportString.Append("| Hard10 |");  // Creates the opening row header
            for (int col = 0; col < nbColumns; col++)
            {
                CreateRow(ReportString, dt, rowIndex, col);
            }
            rowIndex++;
            // Creates the row ->  ("|Hard11|  s  |  s  |  s  |  s  |  s  |  s  |  s  |  s  |   s  |   s  |");
            ReportString.Append("| Hard11 |");  // Creates the opening row header
            for (int col = 0; col < nbColumns; col++)
            {
                CreateRow(ReportString, dt, rowIndex, col);
            }
            rowIndex++;
            // Creates the row ->  ("|Hard12|  s  |  s  |  s  |  s  |  s  |  s  |  s  |  s  |   s  |   s  |");
            ReportString.Append("| Hard12 |");  // Creates the opening row header
            for (int col = 0; col < nbColumns; col++)
            {
                CreateRow(ReportString, dt, rowIndex, col);
            }
            rowIndex++;
            // Creates the row ->  ("|Hard13|  s  |  s  |  s  |  s  |  s  |  s  |  s  |  s  |   s  |   s  |");
            ReportString.Append("| Hard13 |");  // Creates the opening row header
            for (int col = 0; col < nbColumns; col++)
            {
                CreateRow(ReportString, dt, rowIndex, col);
            }
            rowIndex++;
            // Creates the row ->  ("|Hard14|  s  |  s  |  s  |  s  |  s  |  s  |  s  |  s  |   s  |   s  |");
            ReportString.Append("| Hard14 |");  // Creates the opening row header
            for (int col = 0; col < nbColumns; col++)
            {
                CreateRow(ReportString, dt, rowIndex, col);
            }
            rowIndex++;
            // Creates the row ->  ("|Hard15|  s  |  s  |  s  |  s  |  s  |  s  |  s  |  s  |   s  |   s  |");
            ReportString.Append("| Hard15 |");  // Creates the opening row header
            for (int col = 0; col < nbColumns; col++)
            {
                CreateRow(ReportString, dt, rowIndex, col);
            }
            rowIndex++;
            // Creates the row ->  ("|Hard16|  s  |  s  |  s  |  s  |  s  |  s  |  s  |  s  |   s  |   s  |");
            ReportString.Append("| Hard16 |");  // Creates the opening row header
            for (int col = 0; col < nbColumns; col++)
            {
                CreateRow(ReportString, dt, rowIndex, col);
            }
            rowIndex++;
            // Creates the row ->  ("|Hard17|  s  |  s  |  s  |  s  |  s  |  s  |  s  |  s  |   s  |   s  |");
            ReportString.Append("| Hard17 |");  // Creates the opening row header
            for (int col = 0; col < nbColumns; col++)
            {
                CreateRow(ReportString, dt, rowIndex, col);
            }
            rowIndex++;
            // Creates the row ->  ("|Hard18|  s  |  s  |  s  |  s  |  s  |  s  |  s  |  s  |   s  |   s  |");
            ReportString.Append("| Hard18 |");  // Creates the opening row header
            for (int col = 0; col < nbColumns; col++)
            {
                CreateRow(ReportString, dt, rowIndex, col);
            }
            rowIndex++;
            // Creates the row ->  ("|Hard19|  s  |  s  |  s  |  s  |  s  |  s  |  s  |  s  |   s  |   s  |");
            ReportString.Append("| Hard19 |");  // Creates the opening row header
            for (int col = 0; col < nbColumns; col++)
            {
                CreateRow(ReportString, dt, rowIndex, col);
            }
            rowIndex++;
            // Creates the row ->  ("|Hard20|  s  |  s  |  s  |  s  |  s  |  s  |  s  |  s  |   s  |   s  |");
            ReportString.Append("| Hard20 |");  // Creates the opening row header
            for (int col = 0; col < nbColumns; col++)
            {
                CreateRow(ReportString, dt, rowIndex, col);
            }
            rowIndex++;
            // Creates the row ->  ("|Hard21|  s  |  s  |  s  |  s  |  s  |  s  |  s  |  s  |   s  |   s  |");
            ReportString.Append("| Hard21 |");  // Creates the opening row header
            for (int col = 0; col < nbColumns; col++)
            {
                CreateRow(ReportString, dt, rowIndex, col);
            }

            ReportString.AppendLine("------------------------------------------------------------------------------------------------------------------------------------------"); // Creates the row splitter
            rowIndex++;
            // Creates the row ->  ("|Soft13|  s  |  s  |  s  |  s  |  s  |  s  |  s  |  s  |   s  |   s  |");
            ReportString.Append("| Soft13 |");  // Creates the opening row header
            for (int col = 0; col < nbColumns; col++)
            {
                CreateRow(ReportString, dt, rowIndex, col);
            }
            rowIndex++;
            // Creates the row ->  ("|Soft14|  s  |  s  |  s  |  s  |  s  |  s  |  s  |  s  |   s  |   s  |");
            ReportString.Append("| Soft14 |");  // Creates the opening row header
            for (int col = 0; col < nbColumns; col++)
            {
                CreateRow(ReportString, dt, rowIndex, col);
            }
            rowIndex++;
            // Creates the row ->  ("|Soft15|  s  |  s  |  s  |  s  |  s  |  s  |  s  |  s  |   s  |   s  |");
            ReportString.Append("| Soft15 |");  // Creates the opening row header
            for (int col = 0; col < nbColumns; col++)
            {
                CreateRow(ReportString, dt, rowIndex, col);
            }
            rowIndex++;
            // Creates the row ->  ("|Soft16|  s  |  s  |  s  |  s  |  s  |  s  |  s  |  s  |   s  |   s  |");
            ReportString.Append("| Soft16 |");  // Creates the opening row header
            for (int col = 0; col < nbColumns; col++)
            {
                CreateRow(ReportString, dt, rowIndex, col);
            }
            rowIndex++;
            // Creates the row ->  ("|Soft17|  s  |  s  |  s  |  s  |  s  |  s  |  s  |  s  |   s  |   s  |");
            ReportString.Append("| Soft17 |");  // Creates the opening row header
            for (int col = 0; col < nbColumns; col++)
            {
                CreateRow(ReportString, dt, rowIndex, col);
            }
            rowIndex++;
            // Creates the row ->  ("|Soft18|  s  |  s  |  s  |  s  |  s  |  s  |  s  |  s  |   s  |   s  |");
            ReportString.Append("| Soft18 |");  // Creates the opening row header
            for (int col = 0; col < nbColumns; col++)
            {
                CreateRow(ReportString, dt, rowIndex, col);
            }
            rowIndex++;
            // Creates the row ->  ("|Soft19|  s  |  s  |  s  |  s  |  s  |  s  |  s  |  s  |   s  |   s  |");
            ReportString.Append("| Soft19 |");  // Creates the opening row header
            for (int col = 0; col < nbColumns; col++)
            {
                CreateRow(ReportString, dt, rowIndex, col);
            }
            rowIndex++;
            // Creates the row ->  ("|Soft20|  s  |  s  |  s  |  s  |  s  |  s  |  s  |  s  |   s  |   s  |");
            ReportString.Append("| Soft20 |");  // Creates the opening row header
            for (int col = 0; col < nbColumns; col++)
            {
                CreateRow(ReportString, dt, rowIndex, col);
            }
            rowIndex++;
            // Creates the row ->  ("|Soft21|  s  |  s  |  s  |  s  |  s  |  s  |  s  |  s  |   s  |   s  |");
            ReportString.Append("| Soft21 |");  // Creates the opening row header
            for (int col = 0; col < nbColumns; col++)
            {
                CreateRow(ReportString, dt, rowIndex, col);
            }
            ReportString.AppendLine("------------------------------------------------------------------------------------------------------------------------------------------"); // Creates the row splitter
            rowIndex++;
            // Creates the row ->  ("|Pair2 |  s  |  s  |  s  |  s  |  s  |  s  |  s  |  s  |   s  |   s  |");
            ReportString.Append("| Pair2  |");  // Creates the opening row header
            for (int col = 0; col < nbColumns; col++)
            {
                CreateRow(ReportString, dt, rowIndex, col);
            }
            rowIndex++;
            // Creates the row ->  ("|Pair3 |  s  |  s  |  s  |  s  |  s  |  s  |  s  |  s  |   s  |   s  |");
            ReportString.Append("| Pair3  |");  // Creates the opening row header
            for (int col = 0; col < nbColumns; col++)
            {
                CreateRow(ReportString, dt, rowIndex, col);
            }
            rowIndex++;
            // Creates the row ->  ("|Pair4 |  s  |  s  |  s  |  s  |  s  |  s  |  s  |  s  |   s  |   s  |");
            ReportString.Append("| Pair4  |");  // Creates the opening row header
            for (int col = 0; col < nbColumns; col++)
            {
                CreateRow(ReportString, dt, rowIndex, col);
            }
            rowIndex++;
            // Creates the row ->  ("|Pair5 |  s  |  s  |  s  |  s  |  s  |  s  |  s  |  s  |   s  |   s  |");
            ReportString.Append("| Pair5  |");  // Creates the opening row header
            for (int col = 0; col < nbColumns; col++)
            {
                CreateRow(ReportString, dt, rowIndex, col);
            }
            rowIndex++;
            // Creates the row ->  ("|Pair6 |  s  |  s  |  s  |  s  |  s  |  s  |  s  |  s  |   s  |   s  |");
            ReportString.Append("| Pair6  |");  // Creates the opening row header
            for (int col = 0; col < nbColumns; col++)
            {
                CreateRow(ReportString, dt, rowIndex, col);
            }
            rowIndex++;
            // Creates the row ->  ("|Pair7 |  s  |  s  |  s  |  s  |  s  |  s  |  s  |  s  |   s  |   s  |");
            ReportString.Append("| Pair7  |");  // Creates the opening row header
            for (int col = 0; col < nbColumns; col++)
            {
                CreateRow(ReportString, dt, rowIndex, col);
            }
            rowIndex++;
            // Creates the row ->  ("|Pair8 |  s  |  s  |  s  |  s  |  s  |  s  |  s  |  s  |   s  |   s  |");
            ReportString.Append("| Pair8  |");  // Creates the opening row header
            for (int col = 0; col < nbColumns; col++)
            {
                CreateRow(ReportString, dt, rowIndex, col);
            }
            rowIndex++;
            // Creates the row ->  ("|Pair9 |  s  |  s  |  s  |  s  |  s  |  s  |  s  |  s  |   s  |   s  |");
            ReportString.Append("| Pair9  |");  // Creates the opening row header
            for (int col = 0; col < nbColumns; col++)
            {
                CreateRow(ReportString, dt, rowIndex, col);
            }
            rowIndex++;
            // Creates the row ->  ("|Pair10|  s  |  s  |  s  |  s  |  s  |  s  |  s  |  s  |   s  |   s  |");
            ReportString.Append("| Pair10 |");  // Creates the opening row header
            for (int col = 0; col < nbColumns; col++)
            {
                CreateRow(ReportString, dt, rowIndex, col);
            }
            rowIndex++;
            // Creates the row ->  ("|PairA |  s  |  s  |  s  |  s  |  s  |  s  |  s  |  s  |   s  |   s  |");
            ReportString.Append("| PairA  |");  // Creates the opening row header
            for (int col = 0; col < nbColumns; col++)
            {
                CreateRow(ReportString, dt, rowIndex, col);
            }
            ReportString.AppendLine(" ");
            ReportString.AppendLine(" ");
            ReportString.AppendLine("--------------------------------------------------------------------------------------------------------------------------------------------"); // Creates the row splitter
            #endregion

            dt = _dealer_strategy.GetDealerStrategyGrid();
            ReportString.AppendLine();
            // Constructs and creates the Dealer Strategy. Converting the strategy (datatable) to a string format.
            ReportString.AppendLine("--------------------------------------------------------- DEALER'S STRATEGY ---------------------------------------------------------");
            ReportString.AppendLine("--------------------------------------------------------------------------------------------------------------------------------------------");
            ReportString.AppendLine("| Strategy Name: " + _dealer_strategy.GetStrategyName());
            #region - Converts: DataTable -> String Table -
            // Writes the strategyTable (DataTable) to a string table. Uses no loops and manually typed to ensure formatting is fully flexible.
            ReportString.AppendLine("|   _   |         _        |");
            ReportString.AppendLine("---------------------");

            //                     ("|Hard5 |  s  |   // Test to ensure columns align
            ReportString.AppendLine("| Hard5  |        " + dt.Rows[0][0].ToString() + "        |");

            // Creates the row ->  ("|Hard6 |  s  |
            ReportString.AppendLine("| Hard6  |        " + dt.Rows[1][0].ToString() + "        |");

            // Creates the row ->  ("|Hard7 |  s  |
            ReportString.AppendLine("| Hard7  |        " + dt.Rows[2][0].ToString() + "        |");

            // Creates the row ->  ("|Hard8 |  s  |
            ReportString.AppendLine("| Hard8  |        " + dt.Rows[3][0].ToString() + "        |");

            // Creates the row ->  ("|Hard9 |  s  |
            ReportString.AppendLine("| Hard9  |        " + dt.Rows[4][0].ToString() + "        |");

            // Creates the row ->  ("|Hard10|  s  |
            ReportString.AppendLine("| Hard10 |        " + dt.Rows[5][0].ToString() + "        |");

            // Creates the row ->  ("|Hard11|  s  |
            ReportString.AppendLine("| Hard11 |        " + dt.Rows[6][0].ToString() + "        |");

            // Creates the row ->  ("|Hard12|  s  |
            ReportString.AppendLine("| Hard12 |        " + dt.Rows[7][0].ToString() + "        |");

            // Creates the row ->  ("|Hard13|  s  |
            ReportString.AppendLine("| Hard13 |        " + dt.Rows[8][0].ToString() + "        |");

            // Creates the row ->  ("|Hard14|  s  |
            ReportString.AppendLine("| Hard14 |        " + dt.Rows[9][0].ToString() + "        |");

            // Creates the row ->  ("|Hard15|  s  |
            ReportString.AppendLine("| Hard15 |        " + dt.Rows[10][0].ToString() + "        |");

            // Creates the row ->  ("|Hard16|  s  |
            ReportString.AppendLine("| Hard16 |        " + dt.Rows[11][0].ToString() + "        |");

            // Creates the row ->  ("|Hard17|  s  |
            ReportString.AppendLine("| Hard17 |        " + dt.Rows[12][0].ToString() + "        |");

            // Creates the row ->  ("|Hard18|  s  |
            ReportString.AppendLine("| Hard18 |        " + dt.Rows[13][0].ToString() + "        |");

            // Creates the row ->  ("|Hard19|  s  |
            ReportString.AppendLine("| Hard19 |        " + dt.Rows[14][0].ToString() + "        |");

            // Creates the row ->  ("|Hard20|  s  |
            ReportString.AppendLine("| Hard20 |        " + dt.Rows[15][0].ToString() + "        |");

            // Creates the row ->  ("|Hard21|  s  |
            ReportString.AppendLine("| Hard21 |        " + dt.Rows[16][0].ToString() + "        |");

            ReportString.AppendLine("---------------------");

            // Creates the row ->  ("|Soft13|  s  |
            ReportString.AppendLine("| Soft13 |        " + dt.Rows[17][0].ToString() + "        |");

            // Creates the row ->  ("|Soft14|  s  |
            ReportString.AppendLine("| Soft14 |        " + dt.Rows[18][0].ToString() + "        |");

            // Creates the row ->  ("|Soft15|  s  |
            ReportString.AppendLine("| Soft15 |        " + dt.Rows[19][0].ToString() + "        |");

            // Creates the row ->  ("|Soft16|  s  |
            ReportString.AppendLine("| Soft16 |        " + dt.Rows[20][0].ToString() + "        |");

            // Creates the row ->  ("|Soft17|  s  |
            ReportString.AppendLine("| Soft17 |        " + dt.Rows[21][0].ToString() + "        |");

            // Creates the row ->  ("|Soft18|  s  |
            ReportString.AppendLine("| Soft18 |        " + dt.Rows[22][0].ToString() + "        |");

            // Creates the row ->  ("|Soft19|  s  |
            ReportString.AppendLine("| Soft19 |        " + dt.Rows[23][0].ToString() + "        |");

            // Creates the row ->  ("|Soft20|  s  |
            ReportString.AppendLine("| Soft20 |        " + dt.Rows[24][0].ToString() + "        |");

            // Creates the row ->  ("|Soft21|  s  |
            ReportString.AppendLine("| Soft21 |        " + dt.Rows[25][0].ToString() + "        |");

            ReportString.AppendLine("---------------------");

            // Creates the row ->  ("|Pair2 |  s  |
            ReportString.AppendLine("| Pair2  |        " + dt.Rows[26][0].ToString() + "        |");

            // Creates the row ->  ("|Pair3 |  s  |
            ReportString.AppendLine("| Pair3  |        " + dt.Rows[27][0].ToString() + "        |");

            // Creates the row ->  ("|Pair4 |  s  |
            ReportString.AppendLine("| Pair4  |        " + dt.Rows[28][0].ToString() + "        |");

            // Creates the row ->  ("|Pair5 |  s  |
            ReportString.AppendLine("| Pair5  |        " + dt.Rows[29][0].ToString() + "        |");

            // Creates the row ->  ("|Pair6 |  s  |
            ReportString.AppendLine("| Pair6  |        " + dt.Rows[30][0].ToString() + "        |");

            // Creates the row ->  ("|Pair7 |  s  |
            ReportString.AppendLine("| Pair7  |        " + dt.Rows[31][0].ToString() + "        |");

            // Creates the row ->  ("|Pair8 |  s  |
            ReportString.AppendLine("| Pair8  |        " + dt.Rows[32][0].ToString() + "        |");

            // Creates the row ->  ("|Pair9 |  s  |
            ReportString.AppendLine("| Pair9  |        " + dt.Rows[33][0].ToString() + "        |");

            // Creates the row ->  ("|Pair10|  s  |
            ReportString.AppendLine("| Pair10 |        " + dt.Rows[34][0].ToString() + "        |");

            // Creates the row ->  ("|PairA |  s  |
            ReportString.AppendLine("| PairA  |        " + dt.Rows[35][0].ToString() + "        |");

            ReportString.AppendLine("---------------------");
            #endregion


            this._ReportString = ReportString;
        }