⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 interceptball.cpp.svn-base

📁 一个巴西大学编写的2D仿真组足球机器人程序
💻 SVN-BASE
字号:
#include "InterceptBall.h"SoccerCommand InterceptBall::primaryAction(){   /*Log.log( 100, "I am fastest to ball;");   primarySoc = intercept( false );                      // intercept the ball   if( primarySoc.commandType == CMD_DASH &&             // if stamina low         WM->getAgentStamina().getStamina() <         SS->getRecoverDecThr()*SS->getStaminaMax()+200 )   {      primarySoc.dPower = 30.0 * WM->getAgentStamina().getRecovery(); // dash slow   }// if stamina high*/   return primarySoc;  // dash as intended}SoccerCommand InterceptBall::cuncurrentAction(){   return turnNeckToObject( OBJECT_BALL, primarySoc );}void InterceptBall::InterceptDefault(){   Log.log( 100, "I am fastest to ball;");   primarySoc = intercept( false );                      // intercept the ball   if( primarySoc.commandType == CMD_DASH &&             // if stamina low         WM->getAgentStamina().getStamina() <         SS->getRecoverDecThr()*SS->getStaminaMax()+200 )   {      primarySoc.dPower = 30.0 * WM->getAgentStamina().getRecovery(); // dash slow   }// if stamina high}void InterceptBall::InterceptFast(){   Log.log( 100, "I am fastest to ball;");   primarySoc = intercept( false );                      // intercept the ball}void InterceptBall::InterceptSlow(){   Log.log( 100, "I am fastest to ball;");   primarySoc = intercept( false );                      // intercept the ball   primarySoc.dPower = 30.0 * WM->getAgentStamina().getRecovery(); // dash slow}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -