MCPcopy Create free account
hub / github.com/LARG/HFO / execute

Method execute

src/role_sample.cpp:64–85  ·  view source on GitHub ↗

-------------------------------------------------------------------*/ ! */

Source from the content-addressed store, hash-verified

62
63*/
64bool
65RoleSample::execute( PlayerAgent * agent )
66{
67 bool kickable = agent->world().self().isKickable();
68 if ( agent->world().existKickableTeammate()
69 && agent->world().teammatesFromBall().front()->distFromBall()
70 < agent->world().ball().distFromSelf() )
71 {
72 kickable = false;
73 }
74
75 if ( kickable )
76 {
77 doKick( agent );
78 }
79 else
80 {
81 doMove( agent );
82 }
83
84 return true;
85}
86
87/*-------------------------------------------------------------------*/
88/*!

Callers 2

doKickMethod · 0.45
doMoveMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected