public TownCenterType(TownCenterService townCenterService, WorkersService workersService) : base("TownCenter") { this.townCenterService = townCenterService; this.workersService = workersService; ReceiveCreationEvents = true; }
public ScenarioGame(GodGameOffline offline, TWEngine engine, Internal.Model.World world, TownCenterType townCenterType, TownCenterService townCenterService, MinerType minerType) { this.world = world; this.townCenterType = townCenterType; this.townCenterService = townCenterService; this.minerType = minerType; offline.AddSimulatorsToEngine(engine); int skipFrames = 0; var scenarioTasks = Run().GetEnumerator(); bool complete = false; engine.AddSimulator(() => { skipFrames--; if (skipFrames > 0) { return; } if (!scenarioTasks.MoveNext()) { complete = true; } if (complete) { return; } skipFrames = scenarioTasks.Current; }, "ScenarioSimulator"); }
public HouseType(ItemTypesFactory itemTypesFactory, TownCenterService townCenterService) : base("House") { this.itemTypesFactory = itemTypesFactory; this.townCenterService = townCenterService; neededResources = new[] { new VillageResource { ItemType = itemTypesFactory.CropType, MaxResourceLevel = 3, MinResourceLevel = 1, ConsummationRate = 10 }, new VillageResource { ItemType = itemTypesFactory.FishType, MaxResourceLevel = 2, MinResourceLevel = 1, ConsummationRate = 10 } }.ToList(); totalResourceCapacity = 0; foreach (var res in neededResources) { totalResourceCapacity += res.MaxResourceLevel; } ReceiveCreationEvents = true; }