📄 param.h~
字号:
#ifndef MSPACEPARAM_H#define MSPACEPARAM_H#include <string># include "geometry.h"namespace MSpace {/**The class is used to parse the messages form communication serve.write by luoweiping*/class Param{public: Param(); void prase(const char *message,int MessageLength); void prase(const std::string& message,int MessageLength); std::string GetString(const char *message,int &i); float GetFloat(const char *message,int& i); void GetPol(Pol &p,const char *message,int& i); bool GetCycle(const char *message); bool GetPlayMode(const char *message); void GetInit(const char *message,int MessageLength); bool GetNumber(const char *message); float GetState(std::string State,const char *message); Pol GetFlag(std::string FalgName,std::string FlagNumber,const char *message); bool GetBall(const char *message); bool GetPlayer(std::string TeamName,int Number,const char *message); bool IsKnow(){return IsKnowNumber;} bool IsActSence(){return Reaction;} ~Param(); Pol Flag_1l; Pol Flag_2l; Pol Flag_1r; Pol Flag_2r; Pol Goal_1l; Pol Goal_2l; Pol Goal_1r; Pol Goal_2r; Pol FG_Pol[8]; Pol Player_teammate[11]; Pol Player_opponent[11]; Pol ball; std::string PlayMode; long FGCycle[8]; long BallCycle; long MateCycle[11]; long OpponentCycle[11]; float FieldLength; float Battery; float BallMass; float FieldWidth; float FieldHeight; float GoalWidth; float GoalDepth; float GoalHeight; float BorderSize; float AgentMass; float AgentRadius; float BallRadius; float AgentMaxSpeed; float Temperature; float Time; long CycleSent; long CycleReceive; int PlayerNumber; bool IsKnowNumber; bool Reaction; bool IsLeft; float UseThinkTime; float pan; float tilt; float HearDegree; float HearTime; std::string HearWord; std::string TeamName;};}#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -