/// <summary> /// Initializes a new instance of the <see cref="TerritoryManager"/> class. /// </summary> /// <param name="injuryManager">Injury manager</param> /// <param name="gangerManager">Ganger manager</param> /// <param name="territoryProvider">Territory provider</param> /// <param name="diceRoller">Dice roller</param> public TerritoryManager(IInjuryManager injuryManager, IGangerManager gangerManager, ITerritoryProvider territoryProvider, IDiceRoller diceRoller) { _injuryManager = injuryManager ?? throw new ArgumentNullException(nameof(injuryManager)); _gangerManager = gangerManager ?? throw new ArgumentNullException(nameof(gangerManager)); _territoryProvider = territoryProvider ?? throw new ArgumentNullException(nameof(territoryProvider)); _diceRoller = diceRoller ?? throw new ArgumentNullException(nameof(diceRoller)); _territoryEffects = new Dictionary <TerritoryEnum, Func <TerritoryWorkStatus, TerritoryIncomeReport> > { { TerritoryEnum.Chempit, ChemPit }, { TerritoryEnum.OldRuins, NoTerritoryEffect }, { TerritoryEnum.Slag, NoTerritoryEffect }, { TerritoryEnum.MineralOutcrop, NoTerritoryEffect }, { TerritoryEnum.Settlement, Settlement }, { TerritoryEnum.MineWorkings, MineWorkings }, { TerritoryEnum.Tunnels, NoTerritoryEffect }, { TerritoryEnum.Vents, NoTerritoryEffect }, { TerritoryEnum.Holestead, NoTerritoryEffect }, { TerritoryEnum.Waterstill, NoTerritoryEffect }, { TerritoryEnum.DrinkingHole, NoTerritoryEffect }, { TerritoryEnum.GuilderContract, GuilderContract }, { TerritoryEnum.FriendlyDoc, FriendlyDoc }, { TerritoryEnum.Workshop, NoTerritoryEffect }, { TerritoryEnum.GamblingDen, GamblingDen }, { TerritoryEnum.SporeCave, SporeCave }, { TerritoryEnum.Archeotech, Archeotech }, { TerritoryEnum.GreenHivers, NoTerritoryEffect }, }; }
public void SetUp() { _mockGangerProvider = new Mock <IGangerProvider>(); _mockSkillManager = new Mock <ISkillManager>(); _mockDiceRoller = new Mock <IDiceRoller>(); _gangerManager = new GangerManager(_mockGangerProvider.Object, _mockSkillManager.Object, _mockDiceRoller.Object); }
/// <summary> /// Initializes a new instance of the <see cref="GameService"/> class. /// </summary> /// <param name="injuryService">Injury service</param> /// <param name="incomeService">Income service</param> /// <param name="experienceService">Experience service</param> /// <param name="gangerManager">Ganger manager</param> public GameService( IInjuryService injuryService, IIncomeService incomeService, IExperienceService experienceService, IGangerManager gangerManager) { _injuryService = injuryService ?? throw new ArgumentNullException(nameof(injuryService)); _incomeService = incomeService ?? throw new ArgumentNullException(nameof(incomeService)); _experienceService = experienceService ?? throw new ArgumentNullException(nameof(experienceService)); _gangerManager = gangerManager ?? throw new ArgumentNullException(nameof(gangerManager)); }
/// <summary> /// Initializes a new instance of the <see cref="GangersController"/> class. /// </summary> /// <param name="gangerManager">Ganger Manager</param> /// <param name="weaponManager">Weapon Manager</param> public GangersController(IGangerManager gangerManager, IWeaponManager weaponManager) { if (gangerManager == null) { throw new ArgumentNullException(nameof(gangerManager)); } if (weaponManager == null) { throw new ArgumentNullException(nameof(weaponManager)); } _gangerManager = gangerManager; _weaponManager = weaponManager; }
/// <summary> /// Initializes a new instance of the <see cref="ExperienceService"/> class. /// </summary> /// <param name="gangerManager">Ganger manager</param> /// <param name="gangManager">Gang manager</param> /// <param name="diceRoller">Dice roller</param> public ExperienceService(IGangerManager gangerManager, IGangManager gangManager, IDiceRoller diceRoller) { _gangerManager = gangerManager ?? throw new ArgumentNullException(nameof(gangerManager)); _gangManager = gangManager ?? throw new ArgumentNullException(nameof(gangManager)); _diceRoller = diceRoller ?? throw new ArgumentNullException(nameof(diceRoller)); }
/// <summary> /// Initializes a new instance of the <see cref="InjuryService"/> class. /// </summary> /// <param name="gangerManager">Ganger manager</param> /// <param name="injuryManager">Injury manager</param> /// <param name="diceRoller">Dice roller</param> public InjuryService(IGangerManager gangerManager, IInjuryManager injuryManager, IDiceRoller diceRoller) { _gangerManager = gangerManager ?? throw new ArgumentNullException(nameof(_gangerManager)); _injuryManager = injuryManager ?? throw new ArgumentNullException(nameof(injuryManager)); _diceRoller = diceRoller ?? throw new ArgumentNullException(nameof(diceRoller)); }