Skip to content
Snippets Groups Projects
idabot.rst 1.15 KiB
Newer Older
David Bergström's avatar
David Bergström committed
IDABot
======

.. class:: library.IDABot

   This is the basis of your bot. It contains all available managers and some
   methods to get you started.

   See :doc:`this page <quickstart>` for how to properly
   inherit from IDABot.

   Instances of managers:

   .. attribute:: IDABot.base_location_manager

      An instance of the class :class:`library.BaseLocationManager`

   .. attribute:: IDABot.tech_tree

      An instance of the class :class:`library.TechTree`

   .. attribute:: IDABot.map_tools

      An instance of the class :class:`library.MapTools`

   .. attribute:: IDABot.building_placer

      An instance of the class :class:`library.BuildingPlacer`

   Methods:

   .. method:: IDABot.get_all_units(self) -> List[library.Unit]

      Retrieves a list of all visible units

   .. method:: IDABot.get_my_units(self) -> List[library.Unit]

      Retrieves a list of all your visible units

   .. method:: IDABot.get_player_race(self) -> library.Race

      Returns the players race, useful if you play Race.Random

   Attributes:

   .. autoattribute:: minerals

   .. autoattribute:: gas

   .. autoattribute:: current_supply

   .. autoattribute:: max_supply