Пример #1
0
        private static ExpeditionLogic ObtainExpeditionLogic(GameState agameState = null)
        {
            var randomProvider  = new RandomProvider();
            var gameState       = agameState ?? new GameState();
            var unitLogic       = new UnitLogic(gameState, randomProvider);
            var fightLogic      = new FightLogic(randomProvider, unitLogic);
            var expeditionLogic = new ExpeditionLogic(randomProvider, unitLogic, fightLogic);

            return(expeditionLogic);
        }
Пример #2
0
        public ExpeditionLogic(RandomProvider rnd, UnitLogic unitLogic, FightLogic fightLogic)
        {
            if (rnd == null)
            {
                throw new ArgumentNullException(nameof(rnd));
            }
            if (unitLogic == null)
            {
                throw new ArgumentNullException(nameof(unitLogic));
            }

            _rnd             = rnd;
            this._unitLogic  = unitLogic;
            this._fightLogic = fightLogic;
        }
Пример #3
0
 public FightLogic(RandomProvider rnd, UnitLogic unitLogic)
 {
     _rnd           = rnd;
     this.unitLogic = unitLogic;
 }