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

Method execute

src/role_offensive_half.cpp:59–80  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

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

Callers 2

doKickMethod · 0.45
doMoveMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected