0.1.2 • Published 3 years ago

@civ-clone/core-city-growth v0.1.2

Weekly downloads
11
License
MIT
Repository
github
Last release
3 years ago

core-city-growth

Methods relating to the changing size of Citys.

The main CityGrowth object stores the current state of Food for a City and has convenience methods for controlling when a City's size changes. CityGrowths are retrieved via a CityGrowthRegistry instance. A growth key of AdditionalData is provided for Citys automatically.

Includes the following Rules:

  • Cost for determining how much Food growth requires.
  • FoodExhausted when FoodStorage is depleted.
  • FoodLow triggered when FoodStorage is "low".
  • FoodStorage processed when CityGrowth.check is called.
  • Grow controls what happens when CityGrowth.grow is called.
  • Shrink when CityGrowth.shrink is called.