コード例 #1
0
ファイル: Tie.cs プロジェクト: MilenPavlov/EuroManager
 public Tie(DateTime firstLegDate, DateTime secondLegDate, Team team1, Team team2)
 {
     FirstLegDate = firstLegDate;
     SecondLegDate = secondLegDate;
     Team1 = team1;
     Team2 = team2;
 }
コード例 #2
0
        public TeamTournamentStats(TournamentSeason tournamentSeason, Team team)
        {
            TournamentSeason = tournamentSeason;
            Team = team;

            PlayerStats = new List<PlayerTournamentStats>();
        }
コード例 #3
0
        public int CreateTeam(int worldId, string name, TeamStrategy strategy, IEnumerable<Tuple<PositionCode, int>> squad)
        {
            var world = Context.Worlds.Find(worldId);
            var team = new Team(world, name, strategy,
                squad.Select(s => new SquadMember(s.Item1, s.Item2)).ToArray());

            Context.Teams.Add(team);
            Context.SaveChanges();

            return team.Id;
        }
コード例 #4
0
ファイル: Fixture.cs プロジェクト: MilenPavlov/EuroManager
 private Fixture(World world, int tournamentSeasonId, DateTime date, Team team1, Team team2, bool isNeutralGround, bool requiresExtraTime)
 {
     TournamentSeasonId = tournamentSeasonId;
     World = world;
     Date = date;
     Team1 = team1;
     Team2 = team2;
     Team1Name = team1.Name;
     Team2Name = team2.Name;
     IsNeutralGround = isNeutralGround;
     RequiresExtraTime = requiresExtraTime;
 }
コード例 #5
0
        private MatchSimulator.Domain.Team ConvertTeamForMatchSimulator(Team team)
        {
            var matchTeam = new MatchSimulator.Domain.Team(team.Name, team.Strategy);

            foreach (var squadMember in team.Squad)
            {
                Player player = squadMember.Player;
                matchTeam.AddSquadPlayer(player.Id, player.Name,
                    MatchSimulator.Domain.Position.FromCode(squadMember.Position),
                    player.DefensiveSkills, player.OffensiveSkills, player.Form);
            }

            return matchTeam;
        }
コード例 #6
0
 public MatchResult(Fixture fixture, Team winner, int score1, int score2, int penaltyScore1, int penaltyScore2,
     IEnumerable<Goal> goals,
     IEnumerable<PlayerMatchStats> playersStats1,
     IEnumerable<PlayerMatchStats> playersStats2)
 {
     TournamentSeasonId = fixture.TournamentSeasonId;
     Date = fixture.Date;
     Team1 = fixture.Team1;
     Team2 = fixture.Team2;
     Team1Name = fixture.Team1Name;
     Team2Name = fixture.Team2Name;
     Winner = winner;
     Score1 = score1;
     Score2 = score2;
     PenaltyScore1 = penaltyScore1;
     PenaltyScore2 = penaltyScore2;
     Goals = goals.ToList();
     PlayersStats1 = playersStats1.ToList();
     PlayersStats2 = playersStats2.ToList();
 }
コード例 #7
0
ファイル: TeamPair.cs プロジェクト: MilenPavlov/EuroManager
 public TeamPair(Team team1, Team team2)
 {
     Team1 = team1;
     Team2 = team2;
 }
コード例 #8
0
 protected void PromoteTeam(Team team)
 {
     PromotedTeams.Add(team);
 }
コード例 #9
0
 public TeamStats GetStatsFor(Team team)
 {
     return TeamStats.First(s => s.Team == team);
 }
コード例 #10
0
 private TournamentSeason DivisionByTeam(Team team)
 {
     return Divisions.First(d => d.Teams.Contains(team));
 }
コード例 #11
0
 public void RelegateTeam(Team team)
 {
     RelegatedTeams.Add(team);
 }
コード例 #12
0
 public void PromoteTeam(Team team)
 {
     PromotedTeams.Add(team);
 }
コード例 #13
0
ファイル: Fixture.cs プロジェクト: MilenPavlov/EuroManager
 public Fixture(TournamentSeason tournamentSeason, DateTime date, Team team1, Team team2, bool isNeutralGround, bool requiresExtraTime)
     : this(tournamentSeason.World, tournamentSeason.Id, date, team1, team2, isNeutralGround, requiresExtraTime)
 {
 }