00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00048 #ifndef _BASICPLAYER_
00049 #define _BASICPLAYER_
00050
00051 #include "ActHandler.h"
00052
00053 extern Logger Log;
00059 class BasicPlayer
00060 {
00061 protected:
00062 ActHandler *ACT;
00063 WorldModel *WM;
00064 ServerSettings *SS;
00065 PlayerSettings *PS;
00067
00068
00069 SoccerCommand alignNeckWithBody ( );
00070 SoccerCommand turnBodyToPoint ( VecPosition pos,
00071 int iPos = 1 );
00072 SoccerCommand turnBackToPoint ( VecPosition pos,
00073 int iPos = 1 );
00074 SoccerCommand turnNeckToPoint ( VecPosition pos,
00075 SoccerCommand com );
00076 SoccerCommand searchBall ( );
00077 SoccerCommand dashToPoint ( VecPosition pos,
00078 int iCycles = 1 );
00079 SoccerCommand freezeBall ( );
00080 SoccerCommand kickBallCloseToBody ( AngDeg ang,
00081 double dKickRatio = 0.16 );
00082 SoccerCommand accelerateBallToVelocity( VecPosition vel );
00083 SoccerCommand catchBall ( );
00084 SoccerCommand communicate ( char *str );
00085 SoccerCommand teleportToPos ( VecPosition pos );
00086 SoccerCommand listenTo ( ObjectT obj );
00087 SoccerCommand tackle ( );
00088
00090
00091 SoccerCommand turnBodyToObject ( ObjectT o );
00092 SoccerCommand turnNeckToObject ( ObjectT o,
00093 SoccerCommand com );
00094 SoccerCommand directTowards ( VecPosition posTo,
00095 AngDeg angWhenToTurn,
00096 VecPosition *pos = NULL,
00097 VecPosition *vel = NULL,
00098 AngDeg *angBody = NULL );
00099 SoccerCommand moveToPos ( VecPosition posTo,
00100 AngDeg angWhenToTurn,
00101 double dDistDashBack = 0.0,
00102 bool bMoveBack = false,
00103 int iCycles = 1 );
00104 SoccerCommand collideWithBall ( );
00105 SoccerCommand interceptClose ( );
00106 SoccerCommand interceptCloseGoalie ( );
00107 SoccerCommand kickTo ( VecPosition posTarget,
00108 double dEndSpeed );
00109 SoccerCommand turnWithBallTo ( AngDeg ang,
00110 AngDeg angKickThr,
00111 double dFreezeThr );
00112 SoccerCommand moveToPosAlongLine ( VecPosition pos,
00113 AngDeg ang,
00114 double dDistThr,
00115 int iSign,
00116 AngDeg angThr,
00117 AngDeg angCorr );
00118
00119
00121
00122 SoccerCommand intercept ( bool isGoalie );
00123 SoccerCommand dribble ( AngDeg ang,
00124 DribbleT d );
00125 SoccerCommand directPass ( VecPosition pos,
00126 PassT passType );
00127 SoccerCommand leadingPass ( ObjectT o,
00128 double dDist,
00129 DirectionT dir = DIR_NORTH );
00130 SoccerCommand throughPass ( ObjectT o,
00131 VecPosition posEnd,
00132 AngDeg *angMax = NULL );
00133 SoccerCommand outplayOpponent ( ObjectT o,
00134 VecPosition pos,
00135 VecPosition *posTo = NULL );
00136 SoccerCommand clearBall ( ClearBallT type,
00137 SideT s = SIDE_ILLEGAL,
00138 AngDeg *angMax = NULL );
00139 SoccerCommand mark ( ObjectT o,
00140 double dDist,
00141 MarkT mark );
00142 SoccerCommand defendGoalLine ( double dDist );
00143 SoccerCommand interceptScoringAttempt ( );
00144 SoccerCommand holdBall ( );
00145
00147
00148 VecPosition getThroughPassShootingPoint( ObjectT objTeam,
00149 VecPosition posEnd,
00150 AngDeg *angMax );
00151 VecPosition getInterceptionPointBall( int *iCyclesBall,
00152 bool isGoalie );
00153 VecPosition getActiveInterceptionPointBall
00154 ( int *iCyclesBall,
00155 bool isGoalie );
00156 VecPosition getDribblePoint ( DribbleT dribble,
00157 double *dDist );
00158 VecPosition getShootPositionOnLine ( VecPosition p1,
00159 VecPosition p2,
00160 AngDeg *angLargest = NULL );
00161 double getEndSpeedForPass ( ObjectT o,
00162 VecPosition posPass );
00163 VecPosition getMarkingPosition ( ObjectT o,
00164 double dDist,
00165 MarkT mark );
00166 } ;
00167
00168 #endif