コード例 #1
0
        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();
        }
コード例 #2
0
ファイル: Engine.cs プロジェクト: madmarks/Minesweeper-7
        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();
        }