Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
Seminar-HFO
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Shashank Suhas
Seminar-HFO
Commits
227ed9dd
Commit
227ed9dd
authored
May 24, 2017
by
DurgeshSamant
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added unum support for python agents
parent
e20696d1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
0 deletions
+7
-0
hfo/hfo.py
hfo/hfo.py
+6
-0
hfo/hfo_c_wrapper.h
hfo/hfo_c_wrapper.h
+1
-0
No files found.
hfo/hfo.py
View file @
227ed9dd
...
@@ -74,6 +74,8 @@ hfo_lib.actionToString.argtypes = [c_int]
...
@@ -74,6 +74,8 @@ hfo_lib.actionToString.argtypes = [c_int]
hfo_lib
.
actionToString
.
restype
=
c_char_p
hfo_lib
.
actionToString
.
restype
=
c_char_p
hfo_lib
.
statusToString
.
argtypes
=
[
c_int
]
hfo_lib
.
statusToString
.
argtypes
=
[
c_int
]
hfo_lib
.
statusToString
.
restype
=
c_char_p
hfo_lib
.
statusToString
.
restype
=
c_char_p
hfo_lib
.
getUnum
.
argtypes
=
[
c_void_p
]
hfo_lib
.
getUnum
.
restype
=
c_int
class
HFOEnvironment
(
object
):
class
HFOEnvironment
(
object
):
def
__init__
(
self
):
def
__init__
(
self
):
...
@@ -149,3 +151,7 @@ class HFOEnvironment(object):
...
@@ -149,3 +151,7 @@ class HFOEnvironment(object):
def
statusToString
(
self
,
status
):
def
statusToString
(
self
,
status
):
""" Returns a string representation of a game status """
""" Returns a string representation of a game status """
return
hfo_lib
.
statusToString
(
status
)
return
hfo_lib
.
statusToString
(
status
)
def
getUnum
(
self
):
""" Return the uniform number of the agent """
return
hfo_lib
.
getUnum
(
self
.
obj
)
hfo/hfo_c_wrapper.h
View file @
227ed9dd
...
@@ -47,6 +47,7 @@ extern "C" {
...
@@ -47,6 +47,7 @@ extern "C" {
StatusToString
(
status
);
// TODO: OSX requires two calls...?!
StatusToString
(
status
);
// TODO: OSX requires two calls...?!
return
StatusToString
(
status
).
c_str
();
return
StatusToString
(
status
).
c_str
();
}
}
int
getUnum
(
hfo
::
HFOEnvironment
*
hfo
)
{
return
hfo
->
getUnum
();}
}
}
#endif
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment