public Engine(IRender render, IStatisticFactory statisticFactory, IStatisticStorage statisticStorage) { if (render == null) { throw new ArgumentNullException("render"); } if (statisticFactory == null) { throw new ArgumentNullException("statisticFactory"); } if (statisticStorage == null) { throw new ArgumentNullException("statisticStorage"); } this.Render = render; this.StatisticFactory = statisticFactory; this.StatisticStorage = statisticStorage; this.State = new StartState(this); this.CommandFactory = new CommandFactory(this); this.Statistic = StatisticFactory.CreateStatistic(); }