00001
00002
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00031
00032 #ifndef RCSC_PLAYER_PLAYER_INTERCEPT_H
00033 #define RCSC_PLAYER_PLAYER_INTERCEPT_H
00034
00035 #include <rcsc/geom/vector_2d.h>
00036 #include <vector>
00037
00038 namespace rcsc {
00039
00040 class PlayerType;
00041 class BallObject;
00042 class PlayerObject;
00043 class WorldModel;
00044
00049 class PlayerIntercept {
00050 private:
00052 const WorldModel & M_world;
00054 const std::vector< Vector2D > & M_ball_pos_cache;
00055
00056
00057 PlayerIntercept();
00058
00059 public:
00060
00066 PlayerIntercept( const WorldModel & world,
00067 const std::vector< Vector2D > & ball_pos_cache )
00068 : M_world( world )
00069 , M_ball_pos_cache( ball_pos_cache )
00070 { }
00071
00075 ~PlayerIntercept()
00076 { }
00077
00079
00086 int predict( const PlayerObject & player,
00087 const PlayerType & player_type,
00088 const int max_cycle ) const;
00089
00090 private:
00100 bool canReachAfterTurnDash( const int cycle,
00101 const PlayerObject & player,
00102 const PlayerType & player_type,
00103 const double & control_area,
00104 const Vector2D & ball_pos ) const;
00105
00115 int predictTurnCycle( const int cycle,
00116 const PlayerObject & player,
00117 const PlayerType & player_type,
00118 const double & control_aera,
00119 const Vector2D & ball_pos ) const;
00120
00131 bool canReachAfterDash( const int n_turn,
00132 const int n_dash,
00133 const PlayerObject & player,
00134 const PlayerType & player_type,
00135 const double & control_area,
00136 const Vector2D & ball_pos ) const;
00137
00144 int predictFinal( const PlayerObject & player,
00145 const PlayerType & player_type ) const;
00146
00147 };
00148
00149 }
00150
00151 #endif