📄 syncedcoach.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 __SYNCED_COACH_H#define __SYNCED_COACH_H#include <BasicCoach.h>#ifndef NULL# define NULL 0#endif // NULL#define SERVER_TIME_OUT 9990 // ms#define BODY_CYCLE_COMMAND_LATE 7 // cycle#define HEAD_CYCLE_COMMAND_LATE 4 // cycle#define SEE_STEP \ (int)(worldModel->getServerParam()["send_step"].asFloat() * \ worldModel->getServerParam()["slow_down_factor"].asFloat())#define SENSE_BODY_STEP \ (int)(worldModel->getServerParam()["sense_body_step"].asFloat() * \ worldModel->getServerParam()["slow_down_factor"].asFloat())class SyncedCoach: public BasicCoach{protected: bool seeGlobalReceivedFlag; bool freeFormCycleCommandSentFlag; bool changePlayerCycleCommandSentFlag; virtual void seeGlobal(const SExpression &exp); virtual void hear(const SExpression &exp); virtual void fullState(const SExpression &exp); virtual void serverParam(const SExpression &exp); virtual void playerParam(const SExpression &exp); virtual void playerType(const SExpression &exp); virtual void init(const SExpression &exp); virtual void think(const SExpression &exp); virtual void changePlayerType(const SExpression &exp); virtual bool decide(); virtual bool synchronize(); virtual bool processTasks() = 0; virtual void logEndInf(); // Getting functions bool isSeeGlobalReceived() const; bool isFreeFormCycleCommandSent() const; bool isChangePlayerCycleCommandSent() const; // Setting functions void setSeeGlobalReceived(bool seeGlobalReceivedFlagArg); void setFreeFormCycleCommandSent(bool freeFormCycleCommandSentFlagArg); void setChangePlayerCycleCommandSent(bool changePlayerCycleCommandSentFlagArg);public: SyncedCoach(int argc, char **argv); virtual ~SyncedCoach();};#endif // __SYNCED_COACH_H
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -