diff --git a/docs/constants.rst b/docs/constants.rst index 9048549851f509ae456607b509151ae7952d5f0c..2a109b4db428962f01995808c322365cd74c6cd7 100644 --- a/docs/constants.rst +++ b/docs/constants.rst @@ -10,10 +10,10 @@ Player constants The following constants are used when referring to a player: -.. autoclass:: library.PLAYER_SELF -.. autoclass:: library.PLAYER_ENEMY -.. autoclass:: library.PLAYER_NEUTRAL -.. autoclass:: library.PLAYER_ALLY +.. autoclass:: commandcenter.PLAYER_SELF +.. autoclass:: commandcenter.PLAYER_ENEMY +.. autoclass:: commandcenter.PLAYER_NEUTRAL +.. autoclass:: commandcenter.PLAYER_ALLY These are internally represented as integers, but these constants should be used instead to avoid confusion. @@ -21,21 +21,21 @@ used instead to avoid confusion. Difficulty ---------- -.. autoclass:: library.Difficulty +.. autoclass:: commandcenter.Difficulty :members: :undoc-members: AIBuild ------- -.. autoclass:: library.AIBuild +.. autoclass:: commandcenter.AIBuild :members: :undoc-members: Race ---- -.. autoclass:: library.Race +.. autoclass:: commandcenter.Race :members: :undoc-members: diff --git a/docs/coordinates.rst b/docs/coordinates.rst index 9aca00ceb9dc90bd7707e249ba8af178677c80cd..6e46c1546259b6c901df82c728b5421029889f06 100644 --- a/docs/coordinates.rst +++ b/docs/coordinates.rst @@ -2,8 +2,8 @@ Coordinates =========== The library uses 2 types of coordinate classes. One for integers and one for -floats, these are called :class:`library.Point2DI` and -:class:`library.Point2D`. Conversion between the two types is possible by +floats, these are called :class:`commandcenter.Point2DI` and +:class:`commandcenter.Point2D`. Conversion between the two types is possible by sending the other type as argument in the constructor. In the case of Point2D to Point2DI the floating point values will just be cast into integer values. @@ -16,7 +16,7 @@ Point2DI -------- -.. class:: library.Point2DI +.. class:: commandcenter.Point2DI These points are used for defining the location of tiles, which are used when placing buildings in Starcraft. @@ -28,7 +28,7 @@ Point2DI Point2D ------- -.. class:: library.Point2D +.. class:: commandcenter.Point2D Instances of this class is used to represent the location of Units and support many operations for general purpose calculation. @@ -38,7 +38,7 @@ Example .. code:: python - from library import Point2D, Point2DI + from commandcenter import Point2D, Point2DI # Creating two points @@ -73,7 +73,7 @@ below: .. code:: python from math import sqrt - from library import Point2D + from commandcenter import Point2D p1 = Point2D(3, 4) p2 = Point2D(1, 2) diff --git a/docs/gettingstarted.rst b/docs/gettingstarted.rst index c68a47300c4efa3530aec4bfe6a2f6f9428f5800..4114d7a8a700da6125cdc9a4fe4ab13b3ae202e4 100644 --- a/docs/gettingstarted.rst +++ b/docs/gettingstarted.rst @@ -17,7 +17,7 @@ and more. import os from typing import Optional - from library import * + from commandcenter import * class MyAgent(IDABot): @@ -56,7 +56,7 @@ Now, let us break it down piece by piece to understand it. .. code-block:: python - from library import * + from commandcenter import * This imports everything from the library into your namespace. @@ -74,7 +74,7 @@ Next, we need to define our bot. def on_step(self): IDABot.on_step(self) -A bot which plays Starcraft is defined as a subclass to the class :class:`library.IDABot` which +A bot which plays Starcraft is defined as a subclass to the class :class:`commandcenter.IDABot` which contains some help code in order to make implementing your bit more straightforward. If we look closer at our newly created bot, it has three methods which are all diff --git a/docs/helpers.rst b/docs/helpers.rst index deebc634528d2dffd148ef45e2efc4ef584df2b4..7c9085462a576a465fc9499c793219296f4c54aa 100644 --- a/docs/helpers.rst +++ b/docs/helpers.rst @@ -10,17 +10,17 @@ decision-making to the user of the API. Here is a full list of all managers: -* :class:`library.BaseLocationManager` -* :class:`library.TechTree` -* :class:`library.MapTools` -* :class:`library.BuildingPlacer` +* :class:`commandcenter.BaseLocationManager` +* :class:`commandcenter.TechTree` +* :class:`commandcenter.MapTools` +* :class:`commandcenter.BuildingPlacer` The rest of this page contains a brief description of each manager. BaseLocationManager ------------------- -.. class:: library.BaseLocationManager +.. class:: commandcenter.BaseLocationManager .. autoattribute:: base_locations @@ -35,7 +35,7 @@ BaseLocationManager BaseLocation ~~~~~~~~~~~~ -.. class:: library.BaseLocation +.. class:: commandcenter.BaseLocation Closely related to BaseLocationManager. This is the datastructure used by the BaseLocationManager to keep track of all base locations and related @@ -61,7 +61,7 @@ BaseLocation TechTree -------- -.. autoclass:: library.TechTree +.. autoclass:: commandcenter.TechTree This class has some invalid information by default, this can be corrected by placing the file `techtree.json` in the working directory. The @@ -70,7 +70,7 @@ TechTree this can be found under the folder data in this link_. A recent file is included in the `template repository`_. - .. automethod:: get_data(argument) -> library.TypeData + .. automethod:: get_data(argument) -> commandcenter.TypeData .. _link: https://github.com/BurnySc2/sc2-techtree .. _here: https://github.com/noorus/sc2-gamedata @@ -79,7 +79,7 @@ TechTree TypeData ~~~~~~~~ -.. autoclass:: library.TypeData +.. autoclass:: commandcenter.TypeData :members: :undoc-members: @@ -89,7 +89,7 @@ TypeData MapTools -------- -.. autoclass:: library.MapTools +.. autoclass:: commandcenter.MapTools :members: :undoc-members: @@ -97,7 +97,7 @@ MapTools Color ~~~~~ -.. autoclass:: library.Color +.. autoclass:: commandcenter.Color :members: :undoc-members: @@ -106,14 +106,14 @@ Color DistanceMap ~~~~~~~~~~~ -.. autoclass:: library.DistanceMap +.. autoclass:: commandcenter.DistanceMap :members: :undoc-members: BuildingPlacer -------------- -.. autoclass:: library.BuildingPlacer +.. autoclass:: commandcenter.BuildingPlacer :members: :undoc-members: diff --git a/docs/idabot.rst b/docs/idabot.rst index c0e9e913916619abbcec7faad34b2e2ec83976a1..64d3b3c44d1169b41094e9c3a2cf24429df80e51 100644 --- a/docs/idabot.rst +++ b/docs/idabot.rst @@ -1,7 +1,7 @@ IDABot ====== -.. autoclass:: library.IDABot +.. autoclass:: commandcenter.IDABot See :ref:`this page <gettingstarted>` for how to properly inherit from IDABot. @@ -60,7 +60,7 @@ IDABot Debug ----- -.. class:: library.IDABot +.. class:: commandcenter.IDABot When developing AI-methods or when simply having a problem. The debug-methods are a great tool for speeding up the process. @@ -84,7 +84,7 @@ Debug .. method:: IDABot.debug_set_energy(self, Float, Unit) - Set the amount (Float) of energy to the :class:`library.Unit` + Set the amount (Float) of energy to the :class:`commandcenter.Unit` The maximum depends on the unit maxenergy. Note: This is not in percent of the unit energy. Same goes for life and shields. diff --git a/docs/idareplayobserver.rst b/docs/idareplayobserver.rst index d2379aefe762981f6bd342a26c7c96c4304a485e..7b7fca3d25b8a6fa9375be883b209164071c973c 100644 --- a/docs/idareplayobserver.rst +++ b/docs/idareplayobserver.rst @@ -1,7 +1,7 @@ IDAReplayObserver ================= -.. class:: library.IDAReplayObserver +.. class:: commandcenter.IDAReplayObserver This is a class for following a replay. @@ -35,11 +35,11 @@ IDAReplayObserver Methods: - .. method:: IDAReplayObserver.get_all_units(self) -> List[library.ReplayUnit] + .. method:: IDAReplayObserver.get_all_units(self) -> List[commandcenter.ReplayUnit] Retrieves a list of all visible units - .. method:: IDAReplayObserver.get_player_race(self, player_id) -> library.Race + .. method:: IDAReplayObserver.get_player_race(self, player_id) -> commandcenter.Race Returns the players race diff --git a/docs/index.rst b/docs/index.rst index da345dada9ea6d61e89b35860c335efcdd0aef95..aefa628276fefc9441e371e194bb366cfd5a71ee 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -22,8 +22,8 @@ Table of contents :maxdepth: 3 gettingstarted - Library<_autosummary/library> - Coordinator<_autosummary/library.Coordinator> + PyCommandCenter<_autosummary/commandcenter> + Coordinator<_autosummary/commandcenter.Coordinator> helpers idabot unit @@ -38,6 +38,6 @@ Table of contents :toctree: _autosummary :hidden: - library - library.Coordinator + commandcenter + commandcenter.Coordinator diff --git a/docs/replays.rst b/docs/replays.rst index af3307805042078bc4de4903642b827ee6a2e08e..ad9f8e93d0e400f46f185f24c1c960e9cf3d0ac8 100644 --- a/docs/replays.rst +++ b/docs/replays.rst @@ -76,7 +76,7 @@ that no action can be preform just observations. .. code-block:: python - from library import * + from commandcenter import * class MyObserver(ReplayObserver): diff --git a/docs/replayunit.rst b/docs/replayunit.rst index 97418b8a252d2eb7df43b0ec43c2d9c74aae5902..8955314e459430e94ba391d305185d6cf544635e 100644 --- a/docs/replayunit.rst +++ b/docs/replayunit.rst @@ -1,7 +1,7 @@ ReplayUnit ========== -.. autoclass:: library.ReplayUnit +.. autoclass:: commandcenter.ReplayUnit Properties: diff --git a/docs/types.rst b/docs/types.rst index 33b8748c0e3e8752b2eb29a0a454ebf6e24cff11..d8370a2620f23680ca57257cd7c5ce9f916a186b 100644 --- a/docs/types.rst +++ b/docs/types.rst @@ -1,12 +1,12 @@ Types ===== -For a full list of all unit types see the enum :class:`library.UNIT_TYPEID`. +For a full list of all unit types see the enum :class:`commandcenter.UNIT_TYPEID`. For more information about a certain unit type, the wrapper class -:class:`library.UnitType` can be used. +:class:`commandcenter.UnitType` can be used. -For a full list of all abilities and upgrades, see :class:`library.ABILITY_ID` -, :class:`library.UPGRADE_ID` and :class:`library.EFFECT_ID` respectively. Note that these does not have any +For a full list of all abilities and upgrades, see :class:`commandcenter.ABILITY_ID` +, :class:`commandcenter.UPGRADE_ID` and :class:`commandcenter.EFFECT_ID` respectively. Note that these does not have any wrapper classes for them. If any of the ID's doesn't respond with the game. Before contacting the labassistent, check the game version @@ -16,7 +16,7 @@ the game anymore. UnitType -------- -.. autoclass:: library.UnitType +.. autoclass:: commandcenter.UnitType :members: :undoc-members: :special-members: __init__ @@ -24,27 +24,27 @@ UnitType UNIT_TYPEID ----------- -.. dropdown:: UNIT_TYPEID Enum (dropdown because of the size of the enum) +.. dropdown:: UNIT_TYPEID Enum (click to expand) - .. autoclass:: library.UNIT_TYPEID + .. autoclass:: commandcenter.UNIT_TYPEID :members: :undoc-members: ABILITY_ID ---------- -.. dropdown:: ABILITY_ID Enum (dropdown because of the size of the enum) +.. dropdown:: ABILITY_ID Enum (click to expand) - .. autoclass:: library.ABILITY_ID + .. autoclass:: commandcenter.ABILITY_ID :members: :undoc-members: UPGRADE_ID ---------- -.. dropdown:: UPGRADE_ID Enum (dropdown because of the size of the enum) +.. dropdown:: UPGRADE_ID Enum (click to expand) - .. autoclass:: library.UPGRADE_ID + .. autoclass:: commandcenter.UPGRADE_ID :members: :undoc-members: @@ -52,9 +52,9 @@ EFFECT_ID ---------- EffectID is for things like ravager bile, or fungal or even a scan. -.. dropdown:: EFFECT_ID Enum (dropdown because of the size of the enum) +.. dropdown:: EFFECT_ID Enum (click to expand) - .. autoclass:: library.EFFECT_ID + .. autoclass:: commandcenter.EFFECT_ID :members: :undoc-members: diff --git a/docs/unit.rst b/docs/unit.rst index 26a6c27d6192ccec7c445ec49c58a8055844f64b..4955340408d66bd1da17280615e92194e5290185 100644 --- a/docs/unit.rst +++ b/docs/unit.rst @@ -1,7 +1,7 @@ Unit ==== -.. autoclass:: library.Unit +.. autoclass:: commandcenter.Unit Properties: