Example #1
0
        protected Player(Player other)
        {
            Trace.WriteLine("Cloning " + other.Name);

            // Copy members here
            this.name = other.Name;
            this.HasShowedThisRound = other.HasShowedThisRound;
            this.HudWindow = null;
            this.IsPlaying = other.IsPlaying;
            this.HasPlayedLastRound = other.HasPlayedLastRound;
            this.SeatNumber = other.SeatNumber;
            this.totalHandsPlayed = (ValueCounter)other.totalHandsPlayed.Clone();
            if (other.MuckedHand != null) this.MuckedHand = (Hand)other.MuckedHand.Clone();
        }
Example #2
0
        public void Store(Player player)
        {
            if (Contains(player))
            {
                // Already in our database, delete old copy
                players.RemoveAll(
                            delegate(Player p)
                            {
                                return p.Name == player.Name && p.GameID == player.GameID;
                            }
                );
            }

            // Add a reference of the player
            players.Add(player);
        }
Example #3
0
 public void DisplayStatistics(Player p)
 {
     statisticsDisplay.Visible = true;
     tabControl.SelectedIndex = tabControl.TabCount - 1;
     statisticsDisplay.DisplayStatistics(p);
 }
Example #4
0
        public override void RegisterHandlers(Hud hud, Table t, Player p)
        {
            base.RegisterHandlers(hud, t, p);

            this.OnPlayerPreflopPushingRangeNeedToBeDisplayed += new OnPlayerPreflopPushingRangeNeedToBeDisplayedHandler(hud.holdemWindow_OnPlayerPreflopPushingRangeNeedToBeDisplayed);
        }
Example #5
0
 public virtual void RegisterHandlers(Hud hud, Table t, Player p)
 {
     this.OnResetStatisticsButtonPressed += new HudWindow.OnResetStatisticsButtonPressedHandler(p.window_OnResetStatisticsButtonPressed);
     this.OnResetAllStatisticsButtonPressed += new HudWindow.OnResetAllStatisticsButtonPressedHandler(t.window_OnResetAllStatisticsButtonPressed);
     this.OnPlayerStatisticsNeedToBeDisplayed += new HudWindow.OnPlayerStatisticsNeedToBeDisplayedHandler(hud.window_OnPlayerStatisticsNeedToBeDisplayed);
     this.LocationChanged += new EventHandler(hud.window_LocationChanged);
 }
Example #6
0
 public bool Contains(Player p)
 {
     return Contains(p.Name, p.GameID);
 }
        /* Displays the statistics for a player */
        public void DisplayStatistics(Player p)
        {
            lastPlayerDisplayed = p;
            lblPlayerName.Text = p.Name;

            PlayerStatistics statistics = p.GetStatistics();

            ClearAllTabPages();

            GenerateTabPages(statistics.GetCategories());

            FillStatistics(statistics);
        }
 public PlayerStatisticsDisplay()
 {
     InitializeComponent();
     lastPlayerDisplayed = null;
 }