示例#1
0
 public Team(string name, List <Player> players, StatisticsTeam statistics, Coach coach)
 {
     this.Setname(name);
     this.players    = players;
     this.statistics = statistics;
     this.coach      = coach;
     this.ranking    = 0;
 }
示例#2
0
        public StatisticsTeam getStatistics()
        {
            statistics = new StatisticsTeam
            {
                Team          = Team,
                MatchesPlayed = gPartido.Matchs(),
                Wins          = gPartido.Wins(),
                Loses         = gPartido.Loses(),
                Draws         = gPartido.Draws(),
                Points        = calculatePoints(gPartido.Wins(), gPartido.Draws()),
                PercentWins   = calculatePercent(gPartido.Matchs(), gPartido.Wins()),
                PercentDraws  = calculatePercent(gPartido.Matchs(), gPartido.Draws()),
                PercentLoses  = calculatePercent(gPartido.Matchs(), gPartido.Loses())
            };

            return(statistics);
        }
示例#3
0
        public StatisticsTeam getAwayStatistics()
        {
            statistics = new StatisticsTeam
            {
                Team          = Team,
                MatchesPlayed = matchsList.Count,
                Wins          = Wins(),
                Loses         = Loses(),
                Draws         = Draws(),
                Points        = calculatePoints(AwayWins(), AwayDraws()),
                PercentWins   = calculatePercent(matchsList.Count, AwayWins()),
                PercentDraws  = calculatePercent(matchsList.Count, AwayDraws()),
                PercentLoses  = calculatePercent(matchsList.Count, AwayLoses())
            };

            return(statistics);
        }