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
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:
......
......@@ -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)
......
......@@ -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
......
......@@ -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:
......
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.
......
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
......
......@@ -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
......@@ -76,7 +76,7 @@ that no action can be preform just observations.
.. code-block:: python
from library import *
from commandcenter import *
class MyObserver(ReplayObserver):
......
ReplayUnit
==========
.. autoclass:: library.ReplayUnit
.. autoclass:: commandcenter.ReplayUnit
Properties:
......
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:
......
Unit
====
.. autoclass:: library.Unit
.. autoclass:: commandcenter.Unit
Properties:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment