Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PyCommandCenter
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Starcraft AI Course
PyCommandCenter
Commits
41e7aa5f
Commit
41e7aa5f
authored
6 years ago
by
David Bergström
Browse files
Options
Downloads
Patches
Plain Diff
Add some documentation on player constants
parent
f35c592c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
docs/index.rst
+1
-4
1 addition, 4 deletions
docs/index.rst
docs/playerconstants.rst
+12
-0
12 additions, 0 deletions
docs/playerconstants.rst
docs/unit.rst
+5
-0
5 additions, 0 deletions
docs/unit.rst
with
18 additions
and
4 deletions
docs/index.rst
+
1
−
4
View file @
41e7aa5f
...
...
@@ -9,6 +9,7 @@ This is a Python module for implementing bots for Starcraft II.
unit
managers
playerconstants
Short overview
==============
...
...
@@ -17,10 +18,6 @@ Short overview
:toctree: _autosummary
library
library.PLAYER_SELF
library.PLAYER_ENEMY
library.PLAYER_NEUTRAL
library.PLAYER_ALLY
library.ABILITY_ID
library.BUFF_ID
library.BaseLocation
...
...
This diff is collapsed.
Click to expand it.
docs/playerconstants.rst
0 → 100644
+
12
−
0
View file @
41e7aa5f
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
These are internally represented as integers, but these constants should be
used instead to avoid confusion.
This diff is collapsed.
Click to expand it.
docs/unit.rst
+
5
−
0
View file @
41e7aa5f
...
...
@@ -38,6 +38,11 @@ Unit
.. attribute:: Unit.player
.. TODO: Add page about PLAYER_* constants
Returns the constant corresponding to player which this unit belongs to.
See the page :doc:`playerconstants` for more information on player
constants.
.. autoattribute:: position
.. autoattribute:: shields
.. autoattribute:: tile_position
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment