/// <summary> /// /// </summary> /// <param name="id">int</param> /// <param name="field">Field</param> /// <param name="home">Team</param> /// <param name="road">Team</param> /// <param name="announcerName">string</param> public Game(int id, string fieldName, int fieldCapacity, Team road, Team home, string announcerName, TimeSpan gameTime, Weather weatherReport) : base(String.Format("Game {0}", id)) { this.gameStats = new GameStats(); //this.gameTimer = new System.Timers.Timer(TIMER_SLEEP); //this.gameTimer.Elapsed += new ElapsedEventHandler(gameTimer_Elapsed); this.weatherReport = weatherReport; this.gameTime = gameTime; this.home = home; this.road = road; this.scoreboard = new Scoreboard(road, home); this.scoreboard.gameOver += new GameOverEventHandler(scoreboard_gameOver); this.field = new Field(fieldName, fieldCapacity, this.scoreboard); this.cc = new ChainCrew(this.field, this); this.announcer = new GameAnnouncer(cc, announcerName); this.announcer.reportAnnounced += new AnnounceReport(announcer_reportAnnounced); this.announcer.ReportGameOpening(this, this.field); InitGameStats(this.home); InitGameStats(this.road); }
/// <summary> /// /// </summary> /// <param name="name">string</param> /// <param name="capacity">int</param> /// <param name="scoreboard">Scoreboard</param> public Field(string name, int capacity, Scoreboard scoreboard) : base(name) { this.capacity = capacity; this.scoreboard = scoreboard; }