Example #1
0
        /// <summary>
        /// Update the data on shown on the DataDisplayForm.
        /// </summary>
        /// <param name="isOpenSeat">An array with true values for seats that are open (no player in that seat)</param>
        /// <param name="isPlayerFolded">A boolean indicating if the player in that seat has already folded</param>
        /// <param name="playerDbIds">The players' database IDs</param>
        /// <param name="playerNames">The players' names</param>
        /// <param name="bettingRound_">The current betting round</param>
        /// <param name="dbGameId_">The database game ID</param>
        public void UpdateData(bool[] isOpenSeat, bool[] isPlayerFolded, int[] playerDbIds, string[] playerNames,
                               BettingRound.Round bettingRound_, int dbGameId_)
        {
            // Start the data processing timers
            dataUpdateStpOthers.Start();
            dataUpdateStpPlrOfInterest.Start();

            // Update time stamp
            timeLbl.Text = DateTime.Now.ToString("hh:mm:ss tt");

            currNumPlayers_tsk = GetCurrentNumberOfPlayers(isOpenSeat);

            // Copy method parameters to class level variables to be used later
            isOpenSeat_tsk     = isOpenSeat;
            isPlayerFolded_tsk = isPlayerFolded;
            bettingRound_tsk   = bettingRound_;
            dbGameId_tsk       = dbGameId_;

            ChartDataInvalid();

            DisplayCurrentBettingRound(bettingRound_);

            List <DbPlayerHandInfoAll>[] playersDbData_ = QueryDbDataToAnalyze(playerDbIds);

            // Create the data update tasks so they are ready to go when the they are called below
            CreateUpdateDataTasks(playersDbData_);

            // Start all the data analysis tasks
            // plrOfInterestIndex is the index of the player of interest
            int plrOfInterestIndex = StartDataAnalysisTasks(playerNames);

            UpdatePlayersNamesOnCharts(isOpenSeat, playerNames);

            UpdatePlayersData(plrOfInterestIndex);
        }
Example #2
0
 /// <summary>
 /// Display the players' action data for the current betting round.
 /// </summary>
 /// <param name="currentBettingRound">The current betting round</param>
 private void DisplayCurrentBettingRound(BettingRound.Round currentBettingRound)
 {
     if (currentBettingRound == BettingRound.Round.PreFlop)
     {
         DisplayPreFlopData();
     }
     else if (currentBettingRound == BettingRound.Round.Flop)
     {
         DisplayFlopData();
     }
     else if (currentBettingRound == BettingRound.Round.Turn)
     {
         DisplayTurnData();
     }
     else
     {
         DisplayRiverData();
     }
 }