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-2002, 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 */
00047 #ifndef _BASICPLAYER_
00048 #define _BASICPLAYER_
00049 
00050 #include "ActHandler.h"
00051 
00052 extern Logger Log; 
00058 class BasicPlayer
00059 {
00060 protected:
00061   ActHandler      *ACT; 
00062   WorldModel      *WM;  
00063   ServerSettings  *SS;  
00064   PlayerSettings  *PS;  
00066 
00067 
00068   SoccerCommand   alignNeckWithBody       (                                   );
00069   SoccerCommand   turnBodyToPoint         ( VecPosition   pos,
00070                                             int           iPos = 1            );
00071   SoccerCommand   turnBackToPoint         ( VecPosition   pos,
00072                                             int           iPos = 1            );
00073   SoccerCommand   turnNeckToPoint         ( VecPosition   pos,
00074                                             SoccerCommand com                 );
00075   SoccerCommand   searchBall              (                                   );
00076   SoccerCommand   dashToPoint             ( VecPosition   pos                 );
00077   SoccerCommand   freezeBall              (                                   );
00078   SoccerCommand   kickBallCloseToBody     ( AngDeg        ang                 );
00079   SoccerCommand   accelerateBallToVelocity( VecPosition   vel                 );
00080   SoccerCommand   catchBall               (                                   );
00081   SoccerCommand   communicate             ( char          *str                );
00082   SoccerCommand   teleportToPos           ( VecPosition   pos                 );
00083 
00085 
00086   SoccerCommand   turnBodyToObject        ( ObjectT       o                   );
00087   SoccerCommand   turnNeckToObject        ( ObjectT       o,
00088                                             SoccerCommand com                 );
00089   SoccerCommand   moveToPos               ( VecPosition   posTo,
00090                                             AngDeg        angWhenToTurn,
00091                                             double        dDistDashBack = 0.0,
00092                                             bool          bMoveBack = false   );
00093   SoccerCommand   interceptClose          (                                   );
00094   SoccerCommand   interceptCloseGoalie    (                                   );
00095   SoccerCommand   kickTo                  ( VecPosition   posTarget,
00096                                             double        dEndSpeed           );
00097   SoccerCommand   turnWithBallTo          ( AngDeg        ang,
00098                                             AngDeg        angKickThr,
00099                                             double        dFreezeThr          );
00100   SoccerCommand   moveToPosAlongLine      ( VecPosition   pos,
00101                                             AngDeg        ang,
00102                                             double        dDistThr,
00103                                             int           iSign,
00104                                             AngDeg        angThr,
00105                                             AngDeg        angCorr             );
00106 
00107 
00109 
00110   SoccerCommand   intercept               ( bool          isGoalie            );
00111   SoccerCommand   dribble                 ( AngDeg        ang,
00112                                             DribbleT      d                   );
00113   SoccerCommand   directPass              ( VecPosition   pos,
00114                                             PassT         passType            );
00115   SoccerCommand   leadingPass             ( ObjectT       o,
00116                                             double        dDist               );
00117   SoccerCommand   throughPass             ( ObjectT       o,
00118                                             VecPosition   posEnd,
00119                                             AngDeg        *angMax = NULL      );
00120   SoccerCommand   outplayOpponent         ( ObjectT       o,
00121                                             VecPosition   pos,
00122                                             VecPosition   *posTo = NULL       );
00123   SoccerCommand   clearBall               ( ClearBallT    type,
00124                                             SideT         s = SIDE_ILLEGAL,
00125                                             AngDeg        *angMax = NULL      );
00126   SoccerCommand   mark                    ( ObjectT       o,
00127                                             double        dDist,
00128                                             MarkT         mark                );
00129   SoccerCommand   defendGoalLine          ( double        dDist               );
00130   SoccerCommand   interceptScoringAttempt (                                   );
00131 
00133 
00134   VecPosition     getThroughPassShootingPoint( ObjectT       objTeam,
00135                                             VecPosition   posEnd,
00136                                             AngDeg        *angMax             );
00137   VecPosition     getInterceptionPointBall( int           *iCyclesBall,
00138                                             bool          isGoalie            );
00139   VecPosition     getShootPositionOnLine  ( VecPosition   p1,
00140                                             VecPosition   p2,
00141                                             AngDeg        *angLargest = NULL  );
00142   double          getEndSpeedForPass      ( ObjectT       o,
00143                                             VecPosition   posPass             );
00144   VecPosition     getMarkingPosition      ( ObjectT       o,
00145                                             double        dDist,
00146                                             MarkT         mark                );
00147 } ;
00148 
00149 #endif

Generated on Tue Jul 2 10:18:51 2002 for UvA Trilearn 2002 by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001