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

📄 opptypes.h

📁 RoboCup 2D 仿真组老牌强队Mersad 2005的完整源代码
💻 H
字号:
/* *  Copyright 2002-2005, Mersad Team, Allameh Helli High School (NODET). * *  This program is free software, you can redistribute it and/or modify *  it under the terms of the GNU General Public License as published by *  the Free Software Foundation. * *  This program is distributed in the hope that it will be useful, *  but WITHOUT ANY WARRANTY; without even the implied warranty of *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *  GNU Library General Public License for more details. * *  This file is created by: Mohammad Salehe * *  Released on Monday 1 August 2005, 10 Mordad 1384 by Mersad RoboCup Team. *  For more information please read README file.*/#ifndef __OPP_TYPES_H#define __OPP_TYPES_H#include <Types.h>#include <AdvancedCoach.h>#include <CoachWorldModel.h>#include <Task.h>class TypeInfo{public:	float playerSpeedMax;	float staminaIncMax;	float playerDecay;	float inertiaMoment;	float dashPowerRate;	float playerSize;	float kickableMargin;	float kickRand;	float extraStamina;	float effortMax;	float effortMin;	void setByPlayerType(const Param &playerParam);		// 0:Unable 1:Able with noise 2:Able	int isAbleToKick(Vector playerPos, Vector ballPos, float playerBodyDir,			Vector Accleration, Side ourSide, const Param &serverParam);			// 0:Unable 1:Able with noise 2:Able	int isAbleToDash(Vector playerVel, Vector playerPrevVel,		   	float playerBodyDir, const Param &serverParam);	bool isMaxDash(Vector playerVel, Vector playerPrevVel,			float playerBodyDir, const Param &serverParam);	// 0:Unable 1:Able with noise 2:Able	int isAbleToTurn(Vector playerVel, float Angle, const Param &serverParam);		bool isMaxTurn(Vector playerVel, float Angle, const Param &serverParam);};class OppTypes: public Task{protected:	bool sureNot[11][7];	float sureIs[11][7];		bool foundSure[11];	int foundType[11];		TypeInfo types[7];	bool typesSet;	float maxPlayerDecay;	float maxKickableArea;	void resetPlayer(int uniNum);	void resetPlayerForFirstTime(int uniNum);	void informOppChangePlayerType(unsigned playerNum);	void checkForTurns();	void informTurn(int uniNum, unsigned time);	void informMaxTurn(int uniNum, unsigned time);	void checkForDashes();	void informDash(int uniNum, unsigned time);	void informMaxDash(int uniNum, unsigned time);	void checkForKicks();	void informKick(int uniNum, unsigned time, Vector acclerate);	// T:changed F:not changed	bool find();	void setFreeForm();public:	OppTypes(const CoachWorldModel *worldModel, const CoachWorldModelHistory &worldModelHistory);	virtual ~OppTypes();		virtual bool execute();	void initialize();};#endif // __OPP_TYPES_H

⌨️ 快捷键说明

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