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 CellScorer( IYieldEstimator yieldEstimator, IMapScorer mapScorer, ITechCanon techCanon, IPossessionRelationship <IHexCell, IResourceNode> nodeLocationCanon ) { YieldEstimator = yieldEstimator; MapScorer = mapScorer; TechCanon = techCanon; NodeLocationCanon = nodeLocationCanon; }
public HomelandBalancer( IYieldEstimator yieldEstimator, ICellScorer cellScorer, ITechCanon techCanon, IWeightedRandomSampler <IBalanceStrategy> balanceStrategySampler ) { YieldEstimator = yieldEstimator; CellScorer = cellScorer; TechCanon = techCanon; BalanceStrategySampler = balanceStrategySampler; }
public HillsBalanceStrategy( IYieldEstimator yieldEstimator, IMapScorer mapScorer, IPossessionRelationship <IHexCell, IResourceNode> nodeLocationCanon, ICellModificationLogic modLogic, ITechCanon techCanon ) { YieldEstimator = yieldEstimator; MapScorer = mapScorer; NodeLocationCanon = nodeLocationCanon; ModLogic = modLogic; TechCanon = techCanon; }
public LakeBalanceStrategy( IHexGrid grid, IYieldEstimator yieldEstimator, IMapScorer mapScorer, IPossessionRelationship <IHexCell, IResourceNode> nodePositionCanon, ICellModificationLogic modLogic, ITechCanon techCanon ) { Grid = grid; YieldEstimator = yieldEstimator; MapScorer = mapScorer; NodePositionCanon = nodePositionCanon; ModLogic = modLogic; TechCanon = techCanon; }
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; }