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); }
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; }
public FightLogic(RandomProvider rnd, UnitLogic unitLogic) { _rnd = rnd; this.unitLogic = unitLogic; }