Skip to content
Snippets Groups Projects
Forked from Starcraft AI Course / PyCommandCenter
264 commits behind the upstream repository.
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
unit.rst 2.27 KiB

Unit

An instance of the class Unit represents one unit in the game. The units are not limited to moveable units, but every entity which is not part of the background is a unit. For example, the minerals and geysers are units as well as all buildings.

For all possible types of units see the enum :class:`library.UNIT_TYPEID`. Some types of objects are almost the same, for example there are many types of mineral deposits, but all of them are mineable. This is one of the motivations behind the :class:`library.UnitType` which aims to to make the list of types more manageable. The UnitType can be accessed by the :any:`Unit.unit_type` property.

It is possible to use Unit as keys in a dictionary, which might be helpful for bookkeeping.

Properties:

Methods: