电脑桌面
添加小米粒文库到电脑桌面
安装后可以在桌面快捷访问

程序3 修正1VIP免费

程序3 修正1_第1页
1/6
程序3 修正1_第2页
2/6
程序3 修正1_第3页
3/6
BOOLCStrategy::Strategy0(CFishActionm_action[],CFishInfom_FishInfo[],CBallInfo&m_goalinfo,CObstaInfom_obst[],CHANNELm_Channel[]){CPointf_pt;//鱼的中心点坐标f_pt=m_FishInfo[0].GetCenterPt();doublef_dir;//鱼的方向,[-PI,PI]f_dir=m_FishInfo[0].GetDirection();CPointfhead_pt;fhead_pt=m_FishInfo[0].GetHeadPoint();CPointtempt,tempt0,tempt1,tempt2,tempt3,tempt4,tempt5,tempt6,tempt7,tempt8,tempt9,tempt10,tempt11,tempt12,tempt13;tempt0.x=61;tempt0.y=116;tempt1.x=125;tempt1.y=50;tempt2.x=190;tempt2.y=25;tempt3.x=227;tempt3.y=25;tempt4.x=418;tempt4.y=60;tempt5.x=542;tempt5.y=100;tempt6.x=558;tempt6.y=196;tempt7.x=555;tempt7.y=302;tempt8.x=408;tempt8.y=370;tempt9.x=267;tempt9.y=390;tempt10.x=196;tempt10.y=379;tempt11.x=147;tempt11.y=348;tempt12.x=55;tempt12.y=303;tempt13.x=30;tempt13.y=214;doubledisfishtoaim0;disfishtoaim0=this->Distance(f_pt,tempt0);doubledisfishtoaim2;disfishtoaim2=this->Distance(f_pt,tempt2);doubledisfishtoaim3;disfishtoaim3=this->Distance(f_pt,tempt3);doubledisfishtoaim5;disfishtoaim5=this->Distance(f_pt,tempt5);doubledisfishtoaim7;disfishtoaim7=this->Distance(f_pt,tempt7);doubledisfishtoaim9;disfishtoaim9=this->Distance(f_pt,tempt9);doubledisfishtoaim10;disfishtoaim10=this->Distance(f_pt,tempt10);doubledisfishtoaim12;disfishtoaim12=this->Distance(f_pt,tempt12);if(fhead_pt.x>0&&fhead_pt.x<80&&fhead_pt.y>tempt0.y&&fhead_pt.y0&&fhead_pt.xtempt1.y&&fhead_pt.ytempt1.x&&fhead_pt.x0&&fhead_pt.y0&&fhead_pt.x0&&fhead_pt.y60&&fhead_pt.x<258&&fhead_pt.y>tempt0.y&&fhead_pt.y<214){m_action[0].mode=0;m_action[0].speed=15;Roundp2p(tempt2,m_action[0],0,m_FishInfo[0]);if(disfishtoaim2<10)//距离10需要调试{m_action[0].speed=4;m_action[0].mode=1;m_action[0].direction=9;}elsem_action[0].speed=15;}elseif(fhead_pt.x>tempt2.x&&fhead_pt.x0&&fhead_pt.y<50)//此坐标值待测{m_action[0].mode=0;m_action[0].direction=7;m_action[0].speed=15;if(fhead_pt.ytempt2.y+15)m_action[0].direction=6;//5需要调试//Roundp2p(tempt3,m_action[0],0,m_FishInfo[0]);if(disfishtoaim3<10)//距离10需要调试{m_action[0].speed=4;m_action[0].mode=1;m_action[0].direction=8;}elsem_action[0].speed=15;}elseif(fhead_pt.x>tempt3.x&&fhead_pt.x0&&fhead_pt.ytempt4.x&&fhead_pt.x0&&fhead_pt.ytempt3.x&&fhead_pt.xtempt4.y&&fhead_pt.y<214){m_action[0].mode=0;m_action[0].speed=15;Roundp2p(tempt5,m_action[0],0,m_FishInfo[0]);if(disfishtoaim5<10){m_action[0].speed=4;m_action[0].mode=1;m_action[0].direction=9;}elsem_action[0].speed=15;}elseif(fhead_pt.x>536&&fhead_pt.x<650&&fhead_pt.y>0&&fhead_pt.y

1、当您付费下载文档后,您只拥有了使用权限,并不意味着购买了版权,文档只能用于自身使用,不得用于其他商业用途(如 [转卖]进行直接盈利或[编辑后售卖]进行间接盈利)。
2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。
3、如文档内容存在违规,或者侵犯商业秘密、侵犯著作权等,请点击“违规举报”。

碎片内容

确认删除?
微信客服
  • 扫码咨询
会员Q群
  • 会员专属群点击这里加入QQ群