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
28c26906
Commit
28c26906
authored
Aug 13, 2017
by
drallensmith
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Further feedback, cleanup changes
parent
db768bb0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
12 deletions
+9
-12
src/agent.cpp
src/agent.cpp
+4
-5
src/bhv_basic_move.cpp
src/bhv_basic_move.cpp
+5
-7
No files found.
src/agent.cpp
View file @
28c26906
...
...
@@ -673,9 +673,9 @@ Agent::doPreprocess()
const
int
count_thr
=
(
wm
.
self
().
goalie
()
?
10
:
5
);
if
(
wm
.
ball
().
posCount
()
<
count_thr
if
(
wm
.
ball
().
posCount
()
>
count_thr
||
(
wm
.
gameMode
().
type
()
!=
GameMode
::
PlayOn
&&
wm
.
ball
().
seenPosCount
()
<
count_thr
+
10
)
)
&&
wm
.
ball
().
seenPosCount
()
>
count_thr
+
10
)
)
{
dlog
.
addText
(
Logger
::
TEAM
,
__FILE__
": search ball"
);
...
...
@@ -817,9 +817,9 @@ Agent::doReorient()
const
int
count_thr
=
(
wm
.
self
().
goalie
()
?
10
:
5
);
if
(
wm
.
ball
().
posCount
()
<
count_thr
if
(
wm
.
ball
().
posCount
()
>
count_thr
||
(
wm
.
gameMode
().
type
()
!=
GameMode
::
PlayOn
&&
wm
.
ball
().
seenPosCount
()
<
count_thr
+
10
)
)
&&
wm
.
ball
().
seenPosCount
()
>
count_thr
+
10
)
)
{
dlog
.
addText
(
Logger
::
TEAM
,
__FILE__
": search ball"
);
...
...
@@ -935,7 +935,6 @@ bool
Agent
::
doMove
()
{
Strategy
::
instance
().
update
(
world
()
);
int
role_num
=
Strategy
::
i
().
roleNumber
(
world
().
self
().
unum
());
// Unused?
return
Bhv_BasicMove
().
execute
(
this
);
}
...
...
src/bhv_basic_move.cpp
View file @
28c26906
...
...
@@ -107,15 +107,13 @@ Bhv_BasicMove::execute( PlayerAgent * agent )
agent
->
debugClient
().
addCircle
(
target_point
,
dist_thr
);
bool
success
=
false
;
if
(
ball
.
posValid
()
||
wm
.
self
().
collidesWithPost
())
{
success
=
true
;
}
if
(
Body_GoToPoint
(
target_point
,
dist_thr
,
dash_power
).
execute
(
agent
)
)
{
// OK
}
else
if
(
Body_TurnToBall
().
execute
(
agent
)
)
{
// OK
).
execute
(
agent
)
||
Body_TurnToBall
().
execute
(
agent
)
)
{
if
(
ball
.
posValid
()
||
wm
.
self
().
collidesWithPost
())
{
success
=
true
;
}
}
else
{
success
=
false
;
}
...
...
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