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

📄 samplescenario.cpp

📁 RoboCup 2D 仿真组老牌强队Mersad 2005的完整源代码
💻 CPP
字号:
/* *  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: Darioush Jalali * *  Released on Monday 1 August 2005, 10 Mordad 1384 by Mersad RoboCup Team. *  For more information please read README file.*/#include "SampleScenario.h"#include "Logger.h"#include <iostream>using namespace std;bool SampleScenario::startCondition(){ 	return true;}bool SampleScenario::endCondition()   { 	return false;}void SampleScenario::setUp(){	LOG  << "Warning: Doing stupid thing" << endl;	cerr << "Warning: Doing stupid thing" << endl;	Command * cmd = NULL;	cmd = new MovePlayerCommand(AT_ADVANCED_COACH, OUR_TEAMNAME, 1, 10, 10, 20, 0.5, 0.5);	connection->send(cmd);  delete cmd;	cmd = new ChangePlayModeCommand(AT_ADVANCED_COACH, "play_on");	connection->send(cmd);  delete cmd;	cmd = new MoveBallCommand(AT_ADVANCED_COACH, 0,0,0,1,1);	connection->send(cmd);	delete cmd;		cmd = NULL ; // to be happy}void SampleScenario::monitor(){	LOG << "SampleScenario is now monitoring the scene ... " << endl;	if (!(worldModel->getCurCycle() % 200)) {		LOG << "Refreshing people!" << endl;		Command * cmd = new RecoverCommand(AT_ADVANCED_COACH);		connection->send(cmd);		delete cmd;	};}void SampleScenario::conclude() {	LOG << "SampleScenario is now concluding ... " << endl;}void SampleScenario::cleanUp(){	Scenario::cleanUp();}SampleScenario::SampleScenario(const CoachWorldModel * worldModel, const CoachWorldModelHistory * 				worldModelHistory, Connection* connection) :				Scenario(worldModel, worldModelHistory,connection){};SampleScenario::~SampleScenario() { } ;

⌨️ 快捷键说明

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