intention_dribble2006.h

説明を見る。
00001 // -*-c++-*-
00002 
00008 /*
00009  *Copyright:
00010 
00011  Copyright (C) Hidehisa AKIYAMA
00012 
00013  This code is free software; you can redistribute it and/or
00014  modify it under the terms of the GNU Lesser General Public
00015  License as published by the Free Software Foundation; either
00016  version 2.1 of the License, or (at your option) any later version.
00017 
00018  This library is distributed in the hope that it will be useful,
00019  but WITHOUT ANY WARRANTY; without even the implied warranty of
00020  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00021  Lesser General Public License for more details.
00022 
00023  You should have received a copy of the GNU Lesser General Public
00024  License along with this library; if not, write to the Free Software
00025  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00026 
00027  *EndCopyright:
00028  */
00029 
00031 
00032 #ifndef RCSC_ACTION_INTENTION_DRIBBLE_2006_H
00033 #define RCSC_ACTION_INTENTION_DRIBBLE_2006_H
00034 
00035 #include <rcsc/player/soccer_intention.h>
00036 #include <rcsc/geom/vector_2d.h>
00037 #include <rcsc/game_time.h>
00038 
00039 namespace rcsc {
00040 
00041 class WorldModel;
00042 
00047 class IntentionDribble2006
00048     : public SoccerIntention {
00049 private:
00050     const Vector2D M_target_point; //< dribble target point
00051     const double M_dist_thr; 
00052 
00053     int M_turn_step; 
00054     int M_dash_step; 
00055 
00056     const double M_dash_power_abs; 
00057     const bool M_back_dash_mode; 
00058 
00059     GameTime M_last_execute_time; 
00060 
00061 public:
00072     IntentionDribble2006( const Vector2D & target_point,
00073                           const double & dist_thr,
00074                           const int turn_step,
00075                           const int dash_step,
00076                           const double & dash_power_abs,
00077                           const bool back_dash,
00078                           const GameTime & start_time )
00079         : M_target_point( target_point )
00080         , M_dist_thr( dist_thr )
00081         , M_turn_step( turn_step )
00082         , M_dash_step( dash_step )
00083         , M_dash_power_abs( dash_power_abs )
00084         , M_back_dash_mode( back_dash )
00085         , M_last_execute_time( start_time )
00086       { }
00087 
00093     bool finished( const PlayerAgent * agent );
00094 
00100     bool execute( PlayerAgent * agent );
00101 
00102 private:
00103 
00107     void clear()
00108       {
00109           M_turn_step = M_dash_step = 0;
00110       }
00111 
00117     bool checkOpponent( const WorldModel & world );
00118 
00124     bool doTurn( PlayerAgent * agent );
00125 
00131     bool doDash( PlayerAgent * agent );
00132 
00133 };
00134 
00135 }
00136 
00137 #endif

librcscに対してThu May 1 15:41:20 2008に生成されました。  doxygen 1.5.0