Exemplo n.º 1
0
 private void InitializeMatchRating(SoccerPlayer p)
 {
     if (p.CurrentSkill >= 70)
     {
         p.MatchRating = Convert.ToDouble(rnd.Next(750, 900)) / 100;
     }
     else if (p.CurrentSkill >= 50)
     {
         p.MatchRating = Convert.ToDouble(rnd.Next(600, 750)) / 100;
     }
     else if (p.CurrentSkill >= 40)
     {
         p.MatchRating = Convert.ToDouble(rnd.Next(500, 650)) / 100;
     }
     else if (p.CurrentSkill >= 30)
     {
         p.MatchRating = Convert.ToDouble(rnd.Next(400, 550)) / 100;
     }
     else if (p.CurrentSkill >= 20)
     {
         p.MatchRating = Convert.ToDouble(rnd.Next(300, 450)) / 100;
     }
     else
     {
         p.MatchRating = Convert.ToDouble(rnd.Next(200, 350)) / 100;
     }
 }
Exemplo n.º 2
0
        private void UpdateMatchRating(SoccerPlayer p)
        {
            double change = Convert.ToDouble(rnd.Next(-50, 51)) / 1000;

            p.MatchRating *= (1 + change);
            if (p.MatchRating > 10)
            {
                p.MatchRating = 10.0;
            }
        }
Exemplo n.º 3
0
        private void DetermineShotsFaced(SoccerPlayer p)
        {
            if (p.DepthChart == 1)
            {
                p.GamesPlayed++;
                int shotsFaced = rnd.Next(2, 7);
                p.ShotsFaced += shotsFaced;

                DetermineSaves(p, shotsFaced);
            }
        }
Exemplo n.º 4
0
 private void DisplaySoccerStats(SoccerPlayer player)
 {
     if (player.Position == Position.GK)
     {
         mainForm.lblScoutedStats.Text = DisplayKeeperStats(player);
     }
     else
     {
         mainForm.lblScoutedStats.Text = DisplayNonKeeperStats(player);
     }
 }
Exemplo n.º 5
0
        private void CalculateKeeperOfTheYearScore(SoccerPlayer p)
        {
            double score = 0;

            score = (p.CurrentSkill * 2) + (p.Team.Wins * 7) + (p.Popularity) + (2 - (p.GAA * 100)) + (p.CleanSheets * 5) + (p.Saves) + p.SavePercentage;
            if (p.DepthChart != 1)
            {
                score = score / 2;
            }
            p.PlayerOfYearScore = score;
        }
Exemplo n.º 6
0
 public void CreateDraftEntrants()
 {
     for (int i = 0; i < numberOfEntrants; i++)
     {
         SoccerPlayer b = new SoccerPlayer(rnd, league.IdCount, Sports.Soccer, rnd.Next(16, 22), DeterminePosition());
         b.PlayerType = PlayerType.DraftEntrant;
         b.League     = league;
         league.DraftEntrants.Add(b);
     }
     ModifyDraftClass(league.DraftEntrants);
     ModifyDraftClassPopularityAndPGP(league.DraftEntrants);
 }
Exemplo n.º 7
0
        private void CalculatePlayerOfTheYearScore(SoccerPlayer p)
        {
            int    goalModifier   = 4;
            int    assistModifier = 1;
            double score          = 0;

            if (p.Position == Position.F)
            {
                goalModifier = 7;
            }
            if (p.Position == Position.MID)
            {
                assistModifier = 5;
            }

            score = (p.CurrentSkill * 2) + (p.Team.Points * 2) + (p.Popularity * 2) + (p.MatchRating * 10) + (p.Goals * goalModifier) + (p.Assists * assistModifier);
            p.PlayerOfYearScore = score;
        }
Exemplo n.º 8
0
        private void DetermineSaves(SoccerPlayer p, int shotsFaced)
        {
            int gkSaveRoll   = 0;
            int goalsAllowed = 0;
            int diceRoll     = 0;

            if (p.CurrentSkill >= 65)
            {
                gkSaveRoll = 5;
            }
            else if (p.CurrentSkill >= 50)
            {
                gkSaveRoll = 6;
            }
            else if (p.CurrentSkill >= 35)
            {
                gkSaveRoll = 7;
            }
            else
            {
                gkSaveRoll = 8;
            }

            for (int i = 0; i < shotsFaced; i++)
            {
                diceRoll = DiceRoll();
                if (diceRoll <= gkSaveRoll)
                {
                    goalsAllowed++;
                }
            }
            if (goalsAllowed > 4)
            {
                goalsAllowed = 4;
            }
            p.GoalsAllowed += goalsAllowed;
            p.Saves        += shotsFaced - goalsAllowed;
            if (goalsAllowed == 0)
            {
                p.CleanSheets++;
            }
            CalculateGAA(p);
            CalculateSavePercentage(p);
        }
Exemplo n.º 9
0
        private void DetermineAssists(SoccerPlayer p)
        {
            bool assist   = false;
            int  diceRoll = DiceRoll();

            if (p.Position == Position.F || p.Position == Position.D)
            {
                if (p.DepthChart == 1 || p.DepthChart == 2)
                {
                    if (p.CurrentSkill >= 65)
                    {
                        if (diceRoll <= 4)
                        {
                            assist = true;
                        }
                    }
                    else if (p.CurrentSkill >= 45)
                    {
                        if (diceRoll <= 3)
                        {
                            assist = true;
                        }
                    }
                    else
                    {
                        if (diceRoll == 2)
                        {
                            assist = true;
                        }
                    }
                }
                else
                {
                    if (p.CurrentSkill >= 55)
                    {
                        if (diceRoll <= 3)
                        {
                            assist = true;
                        }
                    }
                    else
                    {
                        if (diceRoll == 2)
                        {
                            assist = true;
                        }
                    }
                }
            }
            else if (p.Position == Position.MID)
            {
                if (p.DepthChart == 1 || p.DepthChart == 2)
                {
                    if (p.CurrentSkill >= 65)
                    {
                        if (diceRoll <= 6)
                        {
                            assist = true;
                        }
                    }
                    else if (p.CurrentSkill >= 45)
                    {
                        if (diceRoll <= 4)
                        {
                            assist = true;
                        }
                    }
                    else
                    {
                        if (diceRoll <= 3)
                        {
                            assist = true;
                        }
                    }
                }
                else
                {
                    if (p.CurrentSkill >= 55)
                    {
                        if (diceRoll <= 3)
                        {
                            assist = true;
                        }
                    }
                    else
                    {
                        if (diceRoll == 2)
                        {
                            assist = true;
                        }
                    }
                }
            }
            if (assist)
            {
                p.Assists++;
            }
        }
Exemplo n.º 10
0
        private void DetermineGoals(SoccerPlayer p, int shotsTaken)
        {
            int goalsScored = 0;
            int diceRoll    = 0;

            for (int i = 0; i < shotsTaken; i++)
            {
                diceRoll = DiceRoll();
                if (p.Position == Position.F)
                {
                    if (p.CurrentSkill >= 65 && diceRoll <= 6)
                    {
                        goalsScored++;
                    }
                    else if (p.CurrentSkill >= 50 && diceRoll <= 5)
                    {
                        goalsScored++;
                    }
                    else if (p.CurrentSkill >= 35 && diceRoll <= 4)
                    {
                        goalsScored++;
                    }
                    else if (p.CurrentSkill < 35 && diceRoll <= 3)
                    {
                        goalsScored++;
                    }
                }
                else if (p.Position == Position.MID)
                {
                    if (p.CurrentSkill >= 65 && diceRoll <= 5)
                    {
                        goalsScored++;
                    }
                    else if (p.CurrentSkill >= 50 && diceRoll <= 4)
                    {
                        goalsScored++;
                    }
                    else if (p.CurrentSkill >= 35 && diceRoll <= 3)
                    {
                        goalsScored++;
                    }
                    else if (p.CurrentSkill < 35 && diceRoll <= 2)
                    {
                        goalsScored++;
                    }
                }
                else if (p.Position == Position.D)
                {
                    if (p.CurrentSkill >= 65 && diceRoll <= 4)
                    {
                        goalsScored++;
                    }
                    else if (p.CurrentSkill >= 50 && diceRoll <= 3)
                    {
                        goalsScored++;
                    }
                    else if (p.CurrentSkill < 50 && diceRoll == 2)
                    {
                        goalsScored++;
                    }
                }
            }
            p.Goals += goalsScored;
        }
Exemplo n.º 11
0
        private void DetermineShotsTaken(SoccerPlayer p)
        {
            int shotsTaken = 0;
            int diceRoll   = DiceRoll();
            int diceRoll2  = DiceRoll();

            if (p.Position == Position.F)
            {
                if (p.DepthChart == 1 || p.DepthChart == 2)
                {
                    if (p.CurrentSkill >= 65)
                    {
                        if (diceRoll <= 3)
                        {
                            shotsTaken = 3;
                        }
                        else if (diceRoll == 12)
                        {
                            shotsTaken = 1;
                        }
                        else
                        {
                            shotsTaken = 2;
                        }
                    }
                    else if (p.CurrentSkill >= 45)
                    {
                        if (diceRoll <= 3)
                        {
                            shotsTaken = 2;
                        }
                        else if (diceRoll == 12)
                        {
                            shotsTaken = 0;
                        }
                        else
                        {
                            shotsTaken = 1;
                        }
                    }
                    else
                    {
                        if (diceRoll == 2)
                        {
                            shotsTaken = 2;
                        }
                        if (diceRoll >= 11)
                        {
                            shotsTaken = 0;
                        }
                        else
                        {
                            shotsTaken = 1;
                        }
                    }
                }
                else
                {
                    if (p.CurrentSkill >= 55)
                    {
                        if (diceRoll <= 3)
                        {
                            shotsTaken = 2;
                        }
                        else if (diceRoll >= 10)
                        {
                            shotsTaken = 0;
                        }
                        else
                        {
                            shotsTaken = 1;
                        }
                    }
                    else
                    {
                        if (diceRoll <= 4)
                        {
                            shotsTaken = 1;
                        }
                        else
                        {
                            shotsTaken = 0;
                        }
                    }
                }
            }
            else if (p.Position == Position.MID)
            {
                if (p.DepthChart == 1 || p.DepthChart == 2)
                {
                    if (p.CurrentSkill >= 65)
                    {
                        if (diceRoll <= 3)
                        {
                            shotsTaken = 2;
                        }
                        else if (diceRoll >= 11)
                        {
                            shotsTaken = 0;
                        }
                        else
                        {
                            shotsTaken = 1;
                        }
                    }
                    else if (p.CurrentSkill >= 45)
                    {
                        if (diceRoll == 2)
                        {
                            shotsTaken = 2;
                        }
                        else if (diceRoll == 7)
                        {
                            shotsTaken = 0;
                        }
                        else
                        {
                            shotsTaken = 1;
                        }
                    }
                    else
                    {
                        if (diceRoll == 2)
                        {
                            shotsTaken = 2;
                        }
                        if (diceRoll >= 8)
                        {
                            shotsTaken = 0;
                        }
                        else
                        {
                            shotsTaken = 1;
                        }
                    }
                }
                else
                {
                    if (p.CurrentSkill >= 55)
                    {
                        if (diceRoll == 2)
                        {
                            shotsTaken = 2;
                        }
                        else if (diceRoll >= 6)
                        {
                            shotsTaken = 0;
                        }
                        else
                        {
                            shotsTaken = 1;
                        }
                    }
                    else
                    {
                        if (diceRoll <= 3)
                        {
                            shotsTaken = 1;
                        }
                        else
                        {
                            shotsTaken = 0;
                        }
                    }
                }
            }
            else if (p.Position == Position.D)
            {
                if (p.DepthChart == 1 || p.DepthChart == 2)
                {
                    if (p.CurrentSkill >= 60)
                    {
                        if (diceRoll <= 3)
                        {
                            shotsTaken = 1;
                        }
                        else
                        {
                            shotsTaken = 0;
                        }
                    }
                    else
                    {
                        if (diceRoll == 2)
                        {
                            shotsTaken = 1;
                        }
                        else
                        {
                            shotsTaken = 0;
                        }
                    }
                }
                else
                {
                    diceRoll2 = DiceRoll();
                    if (diceRoll <= 3 && diceRoll2 <= 3)
                    {
                        shotsTaken = 1;
                    }
                    else
                    {
                        shotsTaken = 0;
                    }
                }
            }
            DetermineGoals(p, shotsTaken);
        }
Exemplo n.º 12
0
 private void CalculateSavePercentage(SoccerPlayer p)
 {
     p.SavePercentage = Convert.ToDouble(p.Saves) / Convert.ToDouble(p.ShotsFaced);
 }
Exemplo n.º 13
0
        public void DisplayScoutedPlayerInfo(Player player)
        {
            Player selectedPlayer = player;

            mainForm.lblScoutedDepthChart.Text = "Spot on Depth Chart: " + selectedPlayer.DepthChart.ToString();
            if (selectedPlayer.IsStarter)
            {
                mainForm.lblStarter.Text = "Starter: yes";
            }
            else
            {
                mainForm.lblScoutedIsStarter.Text = "Starter: no";
            }

            if (selectedPlayer.Sport == Sports.Basketball)
            {
                DisplayBasketballStats((BasketballPlayer)selectedPlayer);
            }
            else if (selectedPlayer.Sport == Sports.Football)
            {
                DisplayFootballStats((FootballPlayer)selectedPlayer);
            }
            else if (selectedPlayer.Sport == Sports.Baseball)
            {
                DisplayBaseballStats((BaseballPlayer)selectedPlayer);
            }
            else if (selectedPlayer.Sport == Sports.Hockey)
            {
                DisplayHockeyStats((HockeyPlayer)selectedPlayer);
            }
            else if (selectedPlayer.Sport == Sports.Soccer)
            {
                DisplaySoccerStats((SoccerPlayer)selectedPlayer);
            }

            if (selectedPlayer.Sport == Sports.Baseball)
            {
                BaseballPlayer baseballPlayer = (BaseballPlayer)selectedPlayer;
                mainForm.lblScoutedPosition.Text = "Position: " + baseballPlayer.Position.ToString();
            }
            else if (selectedPlayer.Sport == Sports.Basketball)
            {
                BasketballPlayer basketballPlayer = (BasketballPlayer)selectedPlayer;
                mainForm.lblScoutedPosition.Text = "Position: " + basketballPlayer.Position.ToString();
            }
            else if (selectedPlayer.Sport == Sports.Football)
            {
                FootballPlayer footballPlayer = (FootballPlayer)selectedPlayer;
                mainForm.lblScoutedPosition.Text = "Position: " + footballPlayer.Position.ToString();
            }
            else if (selectedPlayer.Sport == Sports.Hockey)
            {
                HockeyPlayer hockeyPlayer = (HockeyPlayer)selectedPlayer;
                mainForm.lblScoutedPosition.Text = "Position: " + hockeyPlayer.Position.ToString();
            }
            else if (selectedPlayer.Sport == Sports.Soccer)
            {
                SoccerPlayer soccerPlayer = (SoccerPlayer)selectedPlayer;
                mainForm.lblScoutedPosition.Text = "Position: " + soccerPlayer.Position.ToString();
            }
            mainForm.lblScoutedAge.Text = "Age: " + selectedPlayer.Age.ToString();

            if (selectedPlayer.Contract != null)
            {
                mainForm.lblScoutedYearlySalary.Text = "Yearly Salary: " + selectedPlayer.Contract.YearlySalary.ToString("C0");
                mainForm.lblScoutedYearsLeft.Text    = "Years Left: " + selectedPlayer.Contract.Years.ToString();
                mainForm.lblScoutedAgentPaid.Text    = "Agent Paid: " + selectedPlayer.Contract.AgentPaySchedule.ToString();
                mainForm.lblScoutedAgentPercent.Text = "Agent Percentage: " + selectedPlayer.Contract.AgentPercentage.ToString() + "%";
            }
            else
            {
                mainForm.lblScoutedYearlySalary.Text = "Yearly Salary: n/a";
                mainForm.lblScoutedYearsLeft.Text    = "Years Left: n/a";
                mainForm.lblScoutedAgentPaid.Text    = "Agent Paid: n/a";
                mainForm.lblScoutedAgentPercent.Text = "Agent Percentage: n/a";
            }

            mainForm.lblScoutedPopularity.Text      = "Popularity: " + selectedPlayer.PopularityString;
            mainForm.lblScoutedTeamHappiness.Text   = "Team Happiness: " + selectedPlayer.TeamHappinessString;
            mainForm.lblScoutedAgencyHappiness.Text = "Agency Happiness: " + selectedPlayer.AgencyHappinessString;
        }
Exemplo n.º 14
0
        private void ScoreJob(FreelanceJob job)
        {
            double baselineScore = job.BaselineJobScore;
            double jobScore      = 10;
            bool   jobDoneInTime;
            string results;
            double penaltyPercentage = 0;

            BasketballPlayer basketballPlayer = null;
            BaseballPlayer   baseballPlayer   = null;
            HockeyPlayer     hockeyPlayer     = null;
            FootballPlayer   footballPlayer   = null;
            SoccerPlayer     soccerPlayer     = null;

            Console.WriteLine("Agency Days To Complete Job: " + world.MyAgency.DaysAttemptingJob.ToString());

            if (world.MyAgency.DaysAttemptingJob <= job.DaysToComplete)
            {
                jobDoneInTime = true;
            }
            else
            {
                jobDoneInTime = false;
            }

            if (!jobDoneInTime)
            {
                penaltyPercentage = (Convert.ToDouble(world.MyAgency.DaysAttemptingJob) - Convert.ToDouble(job.DaysToComplete)) / Convert.ToDouble(job.DaysToComplete);
                Console.WriteLine("Original Job Score: " + jobScore.ToString());
            }

            if (job.JobType == JobType.education)
            {
                jobScore = 10;
            }
            else if (job.JobType == JobType.negotiating)
            {
                GetClientSignedFunctions getClientSignedFunctions = new GetClientSignedFunctions(world.mainForm, world);
                League        league;
                List <Agency> agencyList = new List <Agency>();
                Sports        sport      = world.MyAgency.Licenses[world.rnd.Next(0, world.MyAgency.Licenses.Count)];
                job.Sport = sport;
                foreach (Agency a in world.Agencies)
                {
                    if (a != world.MyAgency)
                    {
                        agencyList.Add(a);
                    }
                }

                if (job.Sport == Sports.Soccer)
                {
                    agencyList          = agencyList.OrderByDescending(o => o.SoccerControl).ToList();
                    league              = world.MLS;
                    soccerPlayer        = new SoccerPlayer(world.rnd, league.IdCount, job.Sport, world.rnd.Next(21, 26), AssignRandomPosition(job.Sport));
                    soccerPlayer.League = league;
                    getClientSignedFunctions.AttemptToGetPlayerSigned(soccerPlayer, league, agencyList[0]);
                    getClientSignedFunctions.BeginNegotiations("money");
                    jobScore = soccerPlayer.TeamHappiness;
                }
                else if (job.Sport == Sports.Hockey)
                {
                    agencyList          = agencyList.OrderByDescending(o => o.HockeyControl).ToList();
                    league              = world.NHL;
                    hockeyPlayer        = new HockeyPlayer(world.rnd, league.IdCount, job.Sport, world.rnd.Next(21, 26), AssignRandomPosition(job.Sport));
                    hockeyPlayer.League = league;
                    getClientSignedFunctions.AttemptToGetPlayerSigned(hockeyPlayer, league, agencyList[0]);
                    getClientSignedFunctions.BeginNegotiations("money");
                    jobScore = hockeyPlayer.TeamHappiness;
                }
                else if (job.Sport == Sports.Baseball)
                {
                    agencyList            = agencyList.OrderByDescending(o => o.BaseballControl).ToList();
                    league                = world.MLB;
                    baseballPlayer        = new BaseballPlayer(world.rnd, league.IdCount, job.Sport, world.rnd.Next(21, 26), AssignRandomPosition(job.Sport));
                    baseballPlayer.League = league;
                    getClientSignedFunctions.AttemptToGetPlayerSigned(baseballPlayer, league, agencyList[0]);
                    getClientSignedFunctions.BeginNegotiations("money");
                    jobScore = baseballPlayer.TeamHappiness;
                }
                else if (job.Sport == Sports.Basketball)
                {
                    agencyList              = agencyList.OrderByDescending(o => o.BasketballControl).ToList();
                    league                  = world.NBA;
                    basketballPlayer        = new BasketballPlayer(world.rnd, league.IdCount, job.Sport, world.rnd.Next(21, 26), AssignRandomPosition(job.Sport));
                    basketballPlayer.League = league;
                    getClientSignedFunctions.AttemptToGetPlayerSigned(basketballPlayer, league, agencyList[0]);
                    getClientSignedFunctions.BeginNegotiations("money");
                    jobScore = basketballPlayer.TeamHappiness;
                }
                else //if (job.Sport == Sports.Football)
                {
                    agencyList            = agencyList.OrderByDescending(o => o.FootballControl).ToList();
                    league                = world.NFL;
                    footballPlayer        = new FootballPlayer(world.rnd, league.IdCount, job.Sport, world.rnd.Next(21, 26), AssignRandomPosition(job.Sport));
                    footballPlayer.League = league;
                    getClientSignedFunctions.AttemptToGetPlayerSigned(footballPlayer, league, agencyList[0]);
                    getClientSignedFunctions.BeginNegotiations("money");
                    jobScore = footballPlayer.TeamHappiness;
                }

                jobScore = jobScore / 10;

                /*Player createdPlayer = new Player(world.rnd, league.IdCount, job.Sport, world.rnd.Next(21, 26));
                 * createdPlayer.Position = AssignRandomPosition(job.Sport);
                 * createdPlayer.League = league;
                 * getClientSignedFunctions.AttemptToGetPlayerSigned(createdPlayer, league, agencyList[0]);
                 * getClientSignedFunctions.BeginNegotiations("money");
                 * jobScore = createdPlayer.TeamHappiness;*/


                //if (jobDoneInTime) jobScore = rnd.Next(6, 11);
                //else jobScore = rnd.Next(1, 6);
            }
            else if (job.JobType == JobType.scouting)
            {
            }



            jobScore = jobScore * (1 - penaltyPercentage);

            Console.WriteLine("penaltyPercentage = " + penaltyPercentage);

            results = "Baseline Score Needed: " + baselineScore.ToString() + Environment.NewLine
                      + "Agency's Job Score: " + jobScore.ToString() + Environment.NewLine;

            if (jobScore >= baselineScore)
            {
                results = results + "SUCCESS!";
                AwardCompanyPayouts(job);
            }
            else
            {
                results = results + "JOB FAILED!";
                // knock agency reputation?
                world.MyAgency.Manager.AddPower(-1);
                world.MyAgency.Manager.UpdateManagerUI(world.mainForm);
            }
            MessageBox.Show(results);
            world.MyAgency.FreelanceJobsAvailable.Remove(job);
            AllEmployeesNotWorking();
            DisplayAvailableJobs();
        }
Exemplo n.º 15
0
        private string DisplayNonKeeperStats(SoccerPlayer player)
        {
            string stats = "GOALS: " + player.Goals + Environment.NewLine + "ASSISTS: " + player.Assists + Environment.NewLine + "Rating: " + player.MatchRating.ToString("#.00");

            return(stats);
        }
Exemplo n.º 16
0
        private string DisplayKeeperStats(SoccerPlayer player)
        {
            string results = "SAVES: " + player.Saves + Environment.NewLine + "SAVE%: " + player.SavePercentage.ToString("P2") + Environment.NewLine + "GA: " + player.GoalsAllowed + Environment.NewLine + "GAA: " + player.GAA.ToString("0.##") + Environment.NewLine + "Clean Sheets: " + player.CleanSheets;

            return(results);
        }
Exemplo n.º 17
0
 private void CalculateGAA(SoccerPlayer p)
 {
     p.GAA = Convert.ToDouble(p.GoalsAllowed) / Convert.ToDouble(p.GamesPlayed);
 }
        public void DisplaySelectedPlayerInfo(Player player)
        {
            League selectedLeague = world.Leagues[mainForm.cbLeagueList.SelectedIndex];
            Team   selectedTeam   = selectedLeague.TeamList[mainForm.cbTeamList.SelectedIndex];
            Player selectedPlayer = player;

            mainForm.lblDepthChart.Text = "Spot on Depth Chart: " + selectedPlayer.DepthChart.ToString();
            if (selectedPlayer.IsStarter)
            {
                mainForm.lblStarter.Text = "Starter: yes";
            }
            else
            {
                mainForm.lblStarter.Text = "Starter: no";
            }

            if (selectedLeague.Sport == Sports.Basketball)
            {
                List <BasketballPlayer> hoopsRoster = new List <BasketballPlayer>();
                foreach (BasketballPlayer bp in selectedTeam.Roster)
                {
                    hoopsRoster.Add(bp);
                }
                DisplayBasketballStats(hoopsRoster[mainForm.cbTeamRoster.SelectedIndex]);
            }
            else if (selectedLeague.Sport == Sports.Football)
            {
                List <FootballPlayer> footballRoster = new List <FootballPlayer>();
                foreach (FootballPlayer fp in selectedTeam.Roster)
                {
                    footballRoster.Add(fp);
                }
                DisplayFootballStats(footballRoster[mainForm.cbTeamRoster.SelectedIndex]);
            }
            else if (selectedLeague.Sport == Sports.Baseball)
            {
                List <BaseballPlayer> baseballRoster = new List <BaseballPlayer>();
                foreach (BaseballPlayer p in selectedTeam.Roster)
                {
                    baseballRoster.Add(p);
                }
                DisplayBaseballStats(baseballRoster[mainForm.cbTeamRoster.SelectedIndex]);
            }
            else if (selectedLeague.Sport == Sports.Hockey)
            {
                List <HockeyPlayer> hockeyRoster = new List <HockeyPlayer>();
                foreach (HockeyPlayer p in selectedTeam.Roster)
                {
                    hockeyRoster.Add(p);
                }
                DisplayHockeyStats(hockeyRoster[mainForm.cbTeamRoster.SelectedIndex]);
            }
            else if (selectedLeague.Sport == Sports.Soccer)
            {
                List <SoccerPlayer> soccerRoster = new List <SoccerPlayer>();
                foreach (SoccerPlayer p in selectedTeam.Roster)
                {
                    soccerRoster.Add(p);
                }
                DisplaySoccerStats(soccerRoster[mainForm.cbTeamRoster.SelectedIndex]);
            }

            if (selectedPlayer.Sport == Sports.Baseball)
            {
                BaseballPlayer baseballPlayer = (BaseballPlayer)selectedPlayer;
                mainForm.lblPosition.Text = "Position: " + baseballPlayer.Position.ToString();
            }
            else if (selectedPlayer.Sport == Sports.Basketball)
            {
                BasketballPlayer basketballPlayer = (BasketballPlayer)selectedPlayer;
                mainForm.lblPosition.Text = "Position: " + basketballPlayer.Position.ToString();
            }
            else if (selectedPlayer.Sport == Sports.Football)
            {
                FootballPlayer footballPlayer = (FootballPlayer)selectedPlayer;
                mainForm.lblPosition.Text = "Position: " + footballPlayer.Position.ToString();
            }
            else if (selectedPlayer.Sport == Sports.Hockey)
            {
                HockeyPlayer hockeyPlayer = (HockeyPlayer)selectedPlayer;
                mainForm.lblPosition.Text = "Position: " + hockeyPlayer.Position.ToString();
            }
            else if (selectedPlayer.Sport == Sports.Soccer)
            {
                SoccerPlayer soccerPlayer = (SoccerPlayer)selectedPlayer;
                mainForm.lblPosition.Text = "Position: " + soccerPlayer.Position.ToString();
            }
            mainForm.lblFullName.Text   = selectedPlayer.FullName;
            mainForm.lblAge.Text        = "Age: " + selectedPlayer.Age.ToString();
            mainForm.lblSkillLevel.Text = "Skill Level: " + selectedPlayer.CurrentSkill.ToString() + "/" + selectedPlayer.PotentialSkill.ToString();

            mainForm.lblYearlySalary.Text = "Yearly Salary: " + selectedPlayer.Contract.YearlySalary.ToString("C0");
            mainForm.lblYearsLeft.Text    = "Years Left: " + selectedPlayer.Contract.Years.ToString();
            mainForm.lblAgentPaid.Text    = "Agent Paid: " + selectedPlayer.Contract.AgentPaySchedule.ToString();
            mainForm.lblAgentPercent.Text = "Agent Percentage: " + selectedPlayer.Contract.AgentPercentage.ToString() + "%";

            mainForm.lblPopularity.Text      = "Popularity: " + selectedPlayer.PopularityString;
            mainForm.lblGreed.Text           = "Greed: " + selectedPlayer.Greed.ToString();
            mainForm.lblLifestyle.Text       = "Lifestyle: " + selectedPlayer.Lifestyle.ToString();
            mainForm.lblLoyalty.Text         = "Loyalty: " + selectedPlayer.Loyalty.ToString();
            mainForm.lblPlayForTitle.Text    = "Play for Title: " + selectedPlayer.PlayForTitleContender.ToString();
            mainForm.lblTeamHappiness.Text   = "Team Happiness: " + selectedPlayer.TeamHappinessString;
            mainForm.lblAgencyHappiness.Text = "Agency Happiness: " + selectedPlayer.AgencyHappinessString;
        }