-------------------------------------------------------------------*/ ! */
| 62 | |
| 63 | */ |
| 64 | bool |
| 65 | RoleSample::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 | /*! |