-------------------------------------------------------------------*/ ! */
| 57 | |
| 58 | */ |
| 59 | bool |
| 60 | RoleOffensiveHalf::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 | /*! |