Skip to content
Snippets Groups Projects
Commit f2e24f8a authored by Daniel de Leng's avatar Daniel de Leng
Browse files

Changing library to commandcenter in documentation

parent d316ab88
No related branches found
No related tags found
No related merge requests found
Pipeline #133104 passed
...@@ -10,10 +10,10 @@ Player constants ...@@ -10,10 +10,10 @@ Player constants
The following constants are used when referring to a player: The following constants are used when referring to a player:
.. autoclass:: library.PLAYER_SELF .. autoclass:: commandcenter.PLAYER_SELF
.. autoclass:: library.PLAYER_ENEMY .. autoclass:: commandcenter.PLAYER_ENEMY
.. autoclass:: library.PLAYER_NEUTRAL .. autoclass:: commandcenter.PLAYER_NEUTRAL
.. autoclass:: library.PLAYER_ALLY .. autoclass:: commandcenter.PLAYER_ALLY
These are internally represented as integers, but these constants should be These are internally represented as integers, but these constants should be
used instead to avoid confusion. used instead to avoid confusion.
...@@ -21,21 +21,21 @@ used instead to avoid confusion. ...@@ -21,21 +21,21 @@ used instead to avoid confusion.
Difficulty Difficulty
---------- ----------
.. autoclass:: library.Difficulty .. autoclass:: commandcenter.Difficulty
:members: :members:
:undoc-members: :undoc-members:
AIBuild AIBuild
------- -------
.. autoclass:: library.AIBuild .. autoclass:: commandcenter.AIBuild
:members: :members:
:undoc-members: :undoc-members:
Race Race
---- ----
.. autoclass:: library.Race .. autoclass:: commandcenter.Race
:members: :members:
:undoc-members: :undoc-members:
......
...@@ -2,8 +2,8 @@ Coordinates ...@@ -2,8 +2,8 @@ Coordinates
=========== ===========
The library uses 2 types of coordinate classes. One for integers and one for The library uses 2 types of coordinate classes. One for integers and one for
floats, these are called :class:`library.Point2DI` and floats, these are called :class:`commandcenter.Point2DI` and
:class:`library.Point2D`. Conversion between the two types is possible by :class:`commandcenter.Point2D`. Conversion between the two types is possible by
sending the other type as argument in the constructor. In the case of 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 Point2D to Point2DI the floating point values will just be cast into
integer values. integer values.
...@@ -16,7 +16,7 @@ Point2DI ...@@ -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 These points are used for defining the location of tiles, which are used when
placing buildings in Starcraft. placing buildings in Starcraft.
...@@ -28,7 +28,7 @@ Point2DI ...@@ -28,7 +28,7 @@ Point2DI
Point2D Point2D
------- -------
.. class:: library.Point2D .. class:: commandcenter.Point2D
Instances of this class is used to represent the location of Units and Instances of this class is used to represent the location of Units and
support many operations for general purpose calculation. support many operations for general purpose calculation.
...@@ -38,7 +38,7 @@ Example ...@@ -38,7 +38,7 @@ Example
.. code:: python .. code:: python
from library import Point2D, Point2DI from commandcenter import Point2D, Point2DI
# Creating two points # Creating two points
...@@ -73,7 +73,7 @@ below: ...@@ -73,7 +73,7 @@ below:
.. code:: python .. code:: python
from math import sqrt from math import sqrt
from library import Point2D from commandcenter import Point2D
p1 = Point2D(3, 4) p1 = Point2D(3, 4)
p2 = Point2D(1, 2) p2 = Point2D(1, 2)
......
...@@ -17,7 +17,7 @@ and more. ...@@ -17,7 +17,7 @@ and more.
import os import os
from typing import Optional from typing import Optional
from library import * from commandcenter import *
class MyAgent(IDABot): class MyAgent(IDABot):
...@@ -56,7 +56,7 @@ Now, let us break it down piece by piece to understand it. ...@@ -56,7 +56,7 @@ Now, let us break it down piece by piece to understand it.
.. code-block:: python .. code-block:: python
from library import * from commandcenter import *
This imports everything from the library into your namespace. This imports everything from the library into your namespace.
...@@ -74,7 +74,7 @@ Next, we need to define our bot. ...@@ -74,7 +74,7 @@ Next, we need to define our bot.
def on_step(self): def on_step(self):
IDABot.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. 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 If we look closer at our newly created bot, it has three methods which are all
......
...@@ -10,17 +10,17 @@ decision-making to the user of the API. ...@@ -10,17 +10,17 @@ decision-making to the user of the API.
Here is a full list of all managers: Here is a full list of all managers:
* :class:`library.BaseLocationManager` * :class:`commandcenter.BaseLocationManager`
* :class:`library.TechTree` * :class:`commandcenter.TechTree`
* :class:`library.MapTools` * :class:`commandcenter.MapTools`
* :class:`library.BuildingPlacer` * :class:`commandcenter.BuildingPlacer`
The rest of this page contains a brief description of each manager. The rest of this page contains a brief description of each manager.
BaseLocationManager BaseLocationManager
------------------- -------------------
.. class:: library.BaseLocationManager .. class:: commandcenter.BaseLocationManager
.. autoattribute:: base_locations .. autoattribute:: base_locations
...@@ -35,7 +35,7 @@ BaseLocationManager ...@@ -35,7 +35,7 @@ BaseLocationManager
BaseLocation BaseLocation
~~~~~~~~~~~~ ~~~~~~~~~~~~
.. class:: library.BaseLocation .. class:: commandcenter.BaseLocation
Closely related to BaseLocationManager. This is the datastructure used by Closely related to BaseLocationManager. This is the datastructure used by
the BaseLocationManager to keep track of all base locations and related the BaseLocationManager to keep track of all base locations and related
...@@ -61,7 +61,7 @@ BaseLocation ...@@ -61,7 +61,7 @@ BaseLocation
TechTree TechTree
-------- --------
.. autoclass:: library.TechTree .. autoclass:: commandcenter.TechTree
This class has some invalid information by default, this can be corrected by This class has some invalid information by default, this can be corrected by
placing the file `techtree.json` in the working directory. The placing the file `techtree.json` in the working directory. The
...@@ -70,7 +70,7 @@ TechTree ...@@ -70,7 +70,7 @@ TechTree
this can be found under the folder data in this link_. this can be found under the folder data in this link_.
A recent file is included in the `template repository`_. 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 .. _link: https://github.com/BurnySc2/sc2-techtree
.. _here: https://github.com/noorus/sc2-gamedata .. _here: https://github.com/noorus/sc2-gamedata
...@@ -79,7 +79,7 @@ TechTree ...@@ -79,7 +79,7 @@ TechTree
TypeData TypeData
~~~~~~~~ ~~~~~~~~
.. autoclass:: library.TypeData .. autoclass:: commandcenter.TypeData
:members: :members:
:undoc-members: :undoc-members:
...@@ -89,7 +89,7 @@ TypeData ...@@ -89,7 +89,7 @@ TypeData
MapTools MapTools
-------- --------
.. autoclass:: library.MapTools .. autoclass:: commandcenter.MapTools
:members: :members:
:undoc-members: :undoc-members:
...@@ -97,7 +97,7 @@ MapTools ...@@ -97,7 +97,7 @@ MapTools
Color Color
~~~~~ ~~~~~
.. autoclass:: library.Color .. autoclass:: commandcenter.Color
:members: :members:
:undoc-members: :undoc-members:
...@@ -106,14 +106,14 @@ Color ...@@ -106,14 +106,14 @@ Color
DistanceMap DistanceMap
~~~~~~~~~~~ ~~~~~~~~~~~
.. autoclass:: library.DistanceMap .. autoclass:: commandcenter.DistanceMap
:members: :members:
:undoc-members: :undoc-members:
BuildingPlacer BuildingPlacer
-------------- --------------
.. autoclass:: library.BuildingPlacer .. autoclass:: commandcenter.BuildingPlacer
:members: :members:
:undoc-members: :undoc-members:
......
IDABot IDABot
====== ======
.. autoclass:: library.IDABot .. autoclass:: commandcenter.IDABot
See :ref:`this page <gettingstarted>` for how to properly See :ref:`this page <gettingstarted>` for how to properly
inherit from IDABot. inherit from IDABot.
...@@ -60,7 +60,7 @@ IDABot ...@@ -60,7 +60,7 @@ IDABot
Debug Debug
----- -----
.. class:: library.IDABot .. class:: commandcenter.IDABot
When developing AI-methods or when simply having a problem. When developing AI-methods or when simply having a problem.
The debug-methods are a great tool for speeding up the process. The debug-methods are a great tool for speeding up the process.
...@@ -84,7 +84,7 @@ Debug ...@@ -84,7 +84,7 @@ Debug
.. method:: IDABot.debug_set_energy(self, Float, Unit) .. 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. The maximum depends on the unit maxenergy.
Note: This is not in percent of the unit energy. Note: This is not in percent of the unit energy.
Same goes for life and shields. Same goes for life and shields.
......
IDAReplayObserver IDAReplayObserver
================= =================
.. class:: library.IDAReplayObserver .. class:: commandcenter.IDAReplayObserver
This is a class for following a replay. This is a class for following a replay.
...@@ -35,11 +35,11 @@ IDAReplayObserver ...@@ -35,11 +35,11 @@ IDAReplayObserver
Methods: 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 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 Returns the players race
......
...@@ -22,8 +22,8 @@ Table of contents ...@@ -22,8 +22,8 @@ Table of contents
:maxdepth: 3 :maxdepth: 3
gettingstarted gettingstarted
Library<_autosummary/library> PyCommandCenter<_autosummary/commandcenter>
Coordinator<_autosummary/library.Coordinator> Coordinator<_autosummary/commandcenter.Coordinator>
helpers helpers
idabot idabot
unit unit
...@@ -38,6 +38,6 @@ Table of contents ...@@ -38,6 +38,6 @@ Table of contents
:toctree: _autosummary :toctree: _autosummary
:hidden: :hidden:
library commandcenter
library.Coordinator commandcenter.Coordinator
...@@ -76,7 +76,7 @@ that no action can be preform just observations. ...@@ -76,7 +76,7 @@ that no action can be preform just observations.
.. code-block:: python .. code-block:: python
from library import * from commandcenter import *
class MyObserver(ReplayObserver): class MyObserver(ReplayObserver):
......
ReplayUnit ReplayUnit
========== ==========
.. autoclass:: library.ReplayUnit .. autoclass:: commandcenter.ReplayUnit
Properties: Properties:
......
Types 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 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` For a full list of all abilities and upgrades, see :class:`commandcenter.ABILITY_ID`
, :class:`library.UPGRADE_ID` and :class:`library.EFFECT_ID` respectively. Note that these does not have any , :class:`commandcenter.UPGRADE_ID` and :class:`commandcenter.EFFECT_ID` respectively. Note that these does not have any
wrapper classes for them. wrapper classes for them.
If any of the ID's doesn't respond with the game. Before contacting the labassistent, check the game version 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. ...@@ -16,7 +16,7 @@ the game anymore.
UnitType UnitType
-------- --------
.. autoclass:: library.UnitType .. autoclass:: commandcenter.UnitType
:members: :members:
:undoc-members: :undoc-members:
:special-members: __init__ :special-members: __init__
...@@ -24,27 +24,27 @@ UnitType ...@@ -24,27 +24,27 @@ UnitType
UNIT_TYPEID 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: :members:
:undoc-members: :undoc-members:
ABILITY_ID 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: :members:
:undoc-members: :undoc-members:
UPGRADE_ID 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: :members:
:undoc-members: :undoc-members:
...@@ -52,9 +52,9 @@ EFFECT_ID ...@@ -52,9 +52,9 @@ EFFECT_ID
---------- ----------
EffectID is for things like ravager bile, or fungal or even a scan. 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: :members:
:undoc-members: :undoc-members:
......
Unit Unit
==== ====
.. autoclass:: library.Unit .. autoclass:: commandcenter.Unit
Properties: Properties:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment