Contains the core models relating to Units.
The primary model, Unit, stores related state objects (Player, City, Tile, Yields, Actions) and
convenience methods for accessing and modifying these.
A key component of a Unit is its ability to perform Actions. This package includes a DelayedAction class which can
easily wrap any Actions that take time to be carried out (BuildIrrigation, Fortify, etc.).
There's also a UnitRegistry which can be used to retrieve Units by City, Player or Tile.
Various base Yields are included to represent the values of the Unit.
When this package is included in your build of civ-clone, it will automatically provide the AdditionalData key
units for City, Player and Tileobjects as a convenience method.
Includes the following Rules:
Actionfor controlling whichActions are available to theUnit.Activatetriggers actions when aUnitisUnit.activated.Busyfor tracking ifDelayedActions are complete.CannotSupportUnittriggered when aCitycannot support aUnitfor whatever reason.CreatedwhenUnits are created.Defeated" " defeated.Destroyed" " destroyed.Moved" " moved.MovementCostwhich controls the cost of moving theUnit.ValidateMoveto confirm if theActionwas successful or not.Visibilityfor applying the results of theUnitsVisibilityYieldto thePlayerWorld.Yieldcontrols the variousYields applicable for theUnit(Attack,Defence,Movement,Visibility).