示例#1
0
        public static void Main()
        {
            IReader                 reader                 = new ConsoleReader();
            IWriter                 writer                 = new ConsoleWriter();
            IOutputStoreManager     outputStoreManager     = new OutputStoreManager();
            ICommandSplit           splitter               = new CommandSpliter();
            IFootballTeamCollection footballTeamCollection = new FootballTeamCollection();

            IEngine engine = new Engine(reader, writer, outputStoreManager, splitter, footballTeamCollection);

            engine.Run();
        }
示例#2
0
		/// <summary>
		/// Erstellt eine neue Fußballliga
		/// </summary>
		/// <param name="teams">Teams der Liga</param>
		public FootballLeague(FootballTeamCollection teams)
			: this(ELeagueRoundMode.DoubleRound, teams)
		{ }
示例#3
0
		/// <summary>
		/// Erstellt eine neue Fußballliga
		/// </summary>
		/// <param name="roundMode">Rundenmodus der Liga</param>
		/// <param name="teams">Teams der Liga</param>
		public FootballLeague(ELeagueRoundMode roundMode, FootballTeamCollection teams)
			: this(new Guid().GetHashCode(), String.Empty, roundMode, teams)
		{ }
示例#4
0
		/// <summary>
		/// Erstellt eine neue Fußballliga
		/// </summary>
		/// <param name="id">ID der Liga</param>
		/// <param name="name">Name der Liga</param>
		/// <param name="roundMode">Rundenmodus der Liga</param>
		/// <param name="teams">Teams der Liga</param>
		public FootballLeague(int id, string name, ELeagueRoundMode roundMode, FootballTeamCollection teams)
			: base(id, name)
		{
			RoundMode = roundMode;
			Teams = teams;

			SimpleLog.Log(String.Format("Create Football League: {0}", ToString()));

			Matches = new ObservableCollection<FootballMatch>();
			CreateMatches();
			CreateTable();

			SimpleLog.Log(String.Format("Football League created with ID={0}", ID));
		}
示例#5
0
 /// <summary>
 /// Erstellt eine neue KO-Runde für Fußballspiele
 /// </summary>
 /// <param name="teams">Teams der KO-Runde. Zwei direkt aufeinanderfolgende Teams spielen gegeneinander.</param>
 public FootballKORound(FootballTeamCollection teams)
     : this(EKORoundMode.OneMatch, teams)
 {
 }
示例#6
0
 /// <summary>
 /// Setzt die KO-Runde zurück
 /// </summary>
 public void Reset()
 {
     CurrentTeams = new FootballTeamCollection(OriginalTeams);
     Matches128 = new ObservableCollection<FootballMatch>();
     Matches64 = new ObservableCollection<FootballMatch>();
     Matches32 = new ObservableCollection<FootballMatch>();
     Matches16 = new ObservableCollection<FootballMatch>();
     MatchesQuarterFinal = new ObservableCollection<FootballMatch>();
     MatchesSemiFinal = new ObservableCollection<FootballMatch>();
     MatchesFinal = new ObservableCollection<FootballMatch>();
 }
示例#7
0
        /// <summary>
        /// Erstellt eine neue KO-Runde für Fußballspiele
        /// </summary>
        /// <param name="id">ID der KO-Runde</param>
        /// <param name="name">Name der KO-Runde</param>
        /// <param name="roundMode">Rundenmodus der KO-Runde</param>
        /// <param name="teams">Teams der KO-Runde. Zwei direkt aufeinanderfolgende Teams spielen gegeneinander.</param>
        public FootballKORound(int id, string name, EKORoundMode roundMode, FootballTeamCollection teams)
            : base(id, name)
        {
            RoundMode = roundMode;
            OriginalTeams = teams;

            SimpleLog.Log(String.Format("Create Football KO Round: {0}", ToString()));

            Reset();

            //Matches = new ObservableCollection<FootballMatch>();
            //CreateMatches();
            //CreateTable();

            SimpleLog.Log(String.Format("Football KO Round created with ID={0}", ID));
        }
		/// <summary>
		/// Filtert die Teamliste basierend auf Kontinent und Staat
		/// </summary>
		private void FilterTeamList()
		{
			SimpleLog.Info(String.Format("Filter Teamlist: Continent={0} State={1}", SelectedContinent, SelectedState?.Name));

			FilteredTeamList = new FootballTeamCollection(Settings.FootballTeams);
			if(SelectedContinent != EContinent.Unknown)
				FilteredTeamList = new FootballTeamCollection(FilteredTeamList.Where(x => x.State.Continent == SelectedContinent));
			if(SelectedState != null && SelectedState != State.NoneState)
				FilteredTeamList = new FootballTeamCollection(FilteredTeamList.Where(x => x.State == SelectedState));
		}