示例#1
0
        /// <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 },
            };
        }
示例#2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GangManager"/> class.
 /// </summary>
 /// <param name="gangProvider">Gang provider</param>
 /// <param name="gangerProvider">Ganger provider</param>
 /// <param name="territoryProvider">Territory provider</param>
 /// <param name="weaponProvider">Weapon provider</param>
 /// <param name="injuryProvider">Injury provider</param>
 /// <param name="skillProvider">Skill provider</param>
 /// <param name="diceRoller">Dice roller</param>
 public GangManager(
     IGangProvider gangProvider,
     IGangerProvider gangerProvider,
     ITerritoryProvider territoryProvider,
     IWeaponProvider weaponProvider,
     IInjuryProvider injuryProvider,
     ISkillProvider skillProvider,
     IDiceRoller diceRoller)
 {
     _gangProvider      = gangProvider ?? throw new ArgumentNullException(nameof(gangProvider));
     _gangerProvider    = gangerProvider ?? throw new ArgumentNullException(nameof(gangerProvider));
     _territoryProvider = territoryProvider ?? throw new ArgumentNullException(nameof(territoryProvider));
     _weaponProvider    = weaponProvider ?? throw new ArgumentNullException(nameof(weaponProvider));
     _injuryProvider    = injuryProvider ?? throw new ArgumentNullException(nameof(InjuryProvider));
     _skillProvider     = skillProvider ?? throw new ArgumentNullException(nameof(skillProvider));
     _diceRoller        = diceRoller ?? throw new ArgumentNullException(nameof(diceRoller));
 }