Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

BasicPlayer.h

Go to the documentation of this file.
00001 /*
00002 Copyright (c) 2000,2001, Jelle Kok, University of Amsterdam
00003 All rights reserved.
00004 
00005 Redistribution and use in source and binary forms, with or without 
00006 modification, are permitted provided that the following conditions are met:
00007 
00008 1. Redistributions of source code must retain the above copyright notice, this 
00009 list of conditions and the following disclaimer. 
00010 
00011 2. Redistributions in binary form must reproduce the above copyright notice, 
00012 this list of conditions and the following disclaimer in the documentation 
00013 and/or other materials provided with the distribution. 
00014 
00015 3. Neither the name of the University of Amsterdam nor the names of its 
00016 contributors may be used to endorse or promote products derived from this 
00017 software without specific prior written permission. 
00018 
00019 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
00020 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
00021 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
00022 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE 
00023 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
00024 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 
00025 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 
00026 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 
00027 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
00028 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00029 */
00043 #ifndef _BASICPLAYER_
00044 #define _BASICPLAYER_
00045 
00046 #include "ActHandler.h"
00047 
00048 extern Logger Log; 
00054 class BasicPlayer
00055 {
00056 protected:
00057   ActHandler      *ACT; 
00058   WorldModel      *WM;  
00059   ServerSettings  *SS;  
00060   PlayerSettings  *PS;  
00062 
00063 
00064   SoccerCommand   alignNeckWithBody       (                                   );
00065   SoccerCommand   turnBodyToPoint         ( VecPosition   pos,
00066                                             int           iPos = 1            );
00067   SoccerCommand   turnBackToPoint         ( VecPosition   pos,
00068                                             int           iPos = 1            );
00069   SoccerCommand   turnNeckToPoint         ( VecPosition   pos,
00070                                             SoccerCommand com                 );
00071   SoccerCommand   searchBall              (                                   );
00072   SoccerCommand   dashToPoint             ( VecPosition   pos                 );
00073   SoccerCommand   freezeBall              (                                   );
00074   SoccerCommand   kickBallCloseToBody     ( AngDeg        ang                 );
00075   SoccerCommand   accelerateBallToVelocity( VecPosition   vel                 );
00076   SoccerCommand   catchBall               (                                   );
00077   SoccerCommand   communicate             ( char          *str                );
00078   SoccerCommand   teleportToPos           ( VecPosition   pos                 );
00079 
00081 
00082   SoccerCommand   turnBodyToObject        ( ObjectT       o                   );
00083   SoccerCommand   turnNeckToObject        ( ObjectT       o,
00084                                             SoccerCommand com                 );
00085   SoccerCommand   moveToPos               ( VecPosition   posTo,
00086                                             AngDeg        angWhenToTurn,
00087                                             double        dDistDashBack = 0.0,
00088                                             bool          bMoveBack = false   );
00089   SoccerCommand   interceptClose          (                                   );
00090   SoccerCommand   interceptCloseGoalie    (                                   );
00091   SoccerCommand   kickTo                  ( VecPosition   posTarget,
00092                                             double        dEndSpeed           );
00093   SoccerCommand   turnWithBallTo          ( AngDeg        ang,
00094                                             AngDeg        angKickThr,
00095                                             double        dFreezeThr          );
00096   SoccerCommand   moveToPosAlongLine      ( VecPosition   pos,
00097                                             AngDeg        ang,
00098                                             double        dDistThr,
00099                                             int           iSign,
00100                                             AngDeg        angThr,
00101                                             AngDeg        angCorr             );
00102 
00103 
00105 
00106   SoccerCommand   intercept               ( bool          bIsGoalie           );
00107   SoccerCommand   dribble                 ( AngDeg        ang,
00108                                             DribbleT      d                   );
00109   SoccerCommand   directPass              ( ObjectT       o,
00110                                             PassT         passType            );
00111   SoccerCommand   leadingPass             ( ObjectT       o,
00112                                             double        dDist               );
00113   SoccerCommand   throughPass             ( ObjectT       o,
00114                                             VecPosition   posEnd,
00115                                             AngDeg        *angMax = NULL      );
00116   SoccerCommand   outplayOpponent         ( ObjectT       o,
00117                                             VecPosition   pos,
00118                                             VecPosition   *posTo              );
00119   SoccerCommand   clearBall               ( ClearBallT    type,
00120                                             SideT         s = SIDE_ILLEGAL,
00121                                             AngDeg        *angMax = NULL      );
00122   SoccerCommand   markOpponent            ( ObjectT       o,
00123                                             double        dDist,
00124                                             MarkT         mark                );
00125   SoccerCommand   defendGoalLine          ( double        dDist               );
00126 
00128 
00129   VecPosition     getInterceptionPointBall( int           *iCyclesBall,
00130                                             bool          isGoalie            );
00131   VecPosition     getShootPositionOnLine  ( VecPosition   p1,
00132                                             VecPosition   p2,
00133                                             AngDeg        *angLargest = NULL  );
00134   double          getEndSpeedForPass      ( ObjectT       o,
00135                                             VecPosition   posPass             );
00136   VecPosition     getMarkingPosition      ( ObjectT       o,
00137                                             double        dDist,
00138                                             MarkT         mark                );
00139 } ;
00140 
00141 #endif
00142 

Generated on Thu Mar 7 00:37:42 2002 for UvA Trilearn 2001 by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001