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
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
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
Erik Ahlroth
PyCommandCenter
Commits
77d961a9
Commit
77d961a9
authored
6 years ago
by
David Bergström
Browse files
Options
Downloads
Patches
Plain Diff
Use snake case for methods of IDABot
parent
6316ecff
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
python-api-src/library.cpp
+2
-2
2 additions, 2 deletions
python-api-src/library.cpp
python-api-src/library.h
+4
-2
4 additions, 2 deletions
python-api-src/library.h
with
6 additions
and
4 deletions
python-api-src/library.cpp
+
2
−
2
View file @
77d961a9
...
...
@@ -54,8 +54,8 @@ PYBIND11_MODULE(library, m)
.
def
(
py
::
init
())
// TODO: The following 3 are CamelCased, but if the name is changed
// the name used for inheritance in Pyhon stays the same. Weird.
.
def
(
"
OnG
ame
S
tart"
,
&
IDABot
::
OnGameStart
)
.
def
(
"
OnS
tep"
,
&
IDABot
::
OnStep
)
.
def
(
"
on_g
ame
_s
tart"
,
&
IDABot
::
OnGameStart
)
.
def
(
"
on_s
tep"
,
&
IDABot
::
OnStep
)
.
def
(
"get_all_units"
,
&
IDABot
::
GetAllUnits
)
.
def
(
"get_my_units"
,
&
IDABot
::
GetMyUnits
)
.
def
(
"get_player_race"
,
&
IDABot
::
GetPlayerRace
)
...
...
This diff is collapsed.
Click to expand it.
python-api-src/library.h
+
4
−
2
View file @
77d961a9
...
...
@@ -29,17 +29,19 @@ public:
using
IDABot
::
IDABot
;
void
OnGameStart
()
override
{
PYBIND11_OVERLOAD
(
PYBIND11_OVERLOAD
_NAME
(
void
,
IDABot
,
"on_game_start"
,
OnGameStart
);
}
void
OnStep
()
override
{
PYBIND11_OVERLOAD
(
PYBIND11_OVERLOAD
_NAME
(
void
,
IDABot
,
"on_step"
,
OnStep
);
}
...
...
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