public SectionSubdivisionLogic( IHexGrid grid, IWeightedRandomSampler <MapSection> mapSectionRandomSampler ) { Grid = grid; MapSectionRandomSampler = mapSectionRandomSampler; }
public ResourceBalanceStrategy( IYieldEstimator yieldEstimator, IResourceNodeFactory resourceNodeFactory, IResourceRestrictionLogic resourceRestrictionCanon, ICellScorer cellScorer, ITechCanon techCanon, IStrategicCopiesLogic strategicCopiesLogic, IWeightedRandomSampler <IHexCell> cellRandomSampler, [Inject(Id = "Available Resources")] IEnumerable <IResourceDefinition> availableResources, IWeightedRandomSampler <IResourceDefinition> resourceRandomSampler ) { YieldEstimator = yieldEstimator; ResourceNodeFactory = resourceNodeFactory; ResourceRestrictionCanon = resourceRestrictionCanon; CellScorer = cellScorer; TechCanon = techCanon; StrategicCopiesLogic = strategicCopiesLogic; CellRandomSampler = cellRandomSampler; ResourceRandomSampler = resourceRandomSampler; foreach (var yieldType in EnumUtil.GetValues <YieldType>()) { BonusResourcesWithYield[yieldType] = availableResources.Where( resource => resource.Type == ResourceType.Bonus && YieldEstimator.GetYieldEstimateForResource(resource)[yieldType] > 0f ).ToArray(); } ScoreIncreasingCandidates = availableResources.Where(resource => resource.Type != ResourceType.Luxury).ToList(); }
public HomelandBalancer( IYieldEstimator yieldEstimator, ICellScorer cellScorer, ITechCanon techCanon, IWeightedRandomSampler <IBalanceStrategy> balanceStrategySampler ) { YieldEstimator = yieldEstimator; CellScorer = cellScorer; TechCanon = techCanon; BalanceStrategySampler = balanceStrategySampler; }
public VegetationPainter( ICellModificationLogic modLogic, IHexGrid grid, IRiverCanon riverCanon, IGridTraversalLogic gridTraversalLogic, IWeightedRandomSampler <IHexCell> cellRandomSampler ) { ModLogic = modLogic; Grid = grid; RiverCanon = riverCanon; GridTraversalLogic = gridTraversalLogic; CellRandomSampler = cellRandomSampler; }
public BarbarianEncampmentSpawner( IEncampmentFactory encampmentFactory, IHexGrid grid, IWeightedRandomSampler <IHexCell> cellSampler, IBarbarianSpawningTools spawningTools, IBarbarianUnitSpawner unitSpawner ) { EncampmentFactory = encampmentFactory; Grid = grid; CellSampler = cellSampler; SpawningTools = spawningTools; UnitSpawner = unitSpawner; }
public LuxuryDistributor( IResourceRestrictionLogic resourceRestrictionCanon, IMapGenerationConfig config, IResourceNodeFactory nodeFactory, IWeightedRandomSampler <IHexCell> cellRandomSampler, IWeightedRandomSampler <IResourceDefinition> resourceRandomSampler ) { ResourceRestrictionCanon = resourceRestrictionCanon; Config = config; NodeFactory = nodeFactory; CellRandomSampler = cellRandomSampler; ResourceRandomSampler = resourceRandomSampler; }
public BarbarianWanderBrain( IHexGrid grid, IUnitPositionCanon unitPositionCanon, DiContainer container, IWeightedRandomSampler <IHexCell> cellRandomSampler, IBarbarianBrainWeightLogic brainTools, IBarbarianConfig barbarianConfig ) { Grid = grid; UnitPositionCanon = unitPositionCanon; Container = container; CellRandomSampler = cellRandomSampler; BrainTools = brainTools; BarbarianConfig = barbarianConfig; }
public RegionGenerator( ICellModificationLogic modLogic, IHexGrid grid, IMapGenerationConfig config, ICellClimateLogic cellClimateLogic, IWeightedRandomSampler <IHexCell> cellRandomSampler, IRiverCanon riverCanon ) { ModLogic = modLogic; Grid = grid; Config = config; CellClimateLogic = cellClimateLogic; CellRandomSampler = cellRandomSampler; RiverCanon = riverCanon; }
public OceanGenerator( ICellModificationLogic modLogic, IRegionGenerator regionGenerator, ITemplateSelectionLogic templateSelectionLogic, IHexGrid grid, List <IBalanceStrategy> availableBalanceStrategies, IWeightedRandomSampler <MapSection> mapSectionRandomSampler ) { ModLogic = modLogic; RegionGenerator = regionGenerator; TemplateSelectionLogic = templateSelectionLogic; Grid = grid; AvailableBalanceStrategies = availableBalanceStrategies; MapSectionRandomSampler = mapSectionRandomSampler; }
public RiverGenerator( IHexGrid grid, IRiverCanon riverCanon, ICellModificationLogic modLogic, IMapGenerationConfig config, IHexPathfinder hexPathfinder, IWeightedRandomSampler <IHexCell> cellRandomSampler ) { Grid = grid; RiverCanon = riverCanon; ModLogic = modLogic; Config = config; HexPathfinder = hexPathfinder; CellRandomSampler = cellRandomSampler; }
public OasisBalanceStrategy( IHexGrid grid, IYieldEstimator yieldEstimator, ITechCanon techCanon, IMapScorer mapScorer, ICellModificationLogic modLogic, IPossessionRelationship <IHexCell, IResourceNode> nodePositionCanon, IWeightedRandomSampler <IHexCell> cellRandomSampler ) { Grid = grid; YieldEstimator = yieldEstimator; TechCanon = techCanon; MapScorer = mapScorer; ModLogic = modLogic; NodePositionCanon = nodePositionCanon; CellRandomSampler = cellRandomSampler; }
public StrategicDistributor( IResourceNodeFactory nodeFactory, IResourceRestrictionLogic resourceRestrictionCanon, IStrategicCopiesLogic strategicCopiesLogic, IWeightedRandomSampler <IHexCell> cellRandomSampler, [Inject(Id = "Available Resources")] IEnumerable <IResourceDefinition> availableResources, IWeightedRandomSampler <IResourceDefinition> resourceRandomSampler ) { NodeFactory = nodeFactory; ResourceRestrictionCanon = resourceRestrictionCanon; StrategicCopiesLogic = strategicCopiesLogic; CellRandomSampler = cellRandomSampler; ResourceRandomSampler = resourceRandomSampler; StrategicResources = availableResources.Where(resource => resource.Type == ResourceType.Strategic); }