当前位置:网站首页>Robocode tutorial 3 - Robo machine analysis

Robocode tutorial 3 - Robo machine analysis

2022-04-23 18:05:00 dawnsun001

From here on , We will learn systematically Robocode, From principle to content .
First , Let's meet our little robot

Robo
Machine analysis

A robot tank includes the following 3 Parts of :
 


§ The fuselage (Body – The fuselage carries artillery and radar . It can control the forward and backward of the fuselage Turn left and right .
§ artillery (Gun - A part mounted on the fuselage for firing shells . You can turn left and right .
§ radar (Radar - Parts mounted on guns to scan enemy tanks , You can rotate the scan left and right . When an enemy tank is scanned, it will trigger onScannedRobot  event .

The three methods involved :
void setAdjustGunForRobotTurn(boolean independent) 
Separate the motion of the gun and the fuselage
void setAdjustRadarForGunTurn(boolean independent) 
Separate the motion of gun and radar
void setAdjustRadarForRobotTurn(boolean independent) 
Separate the movement of radar and fuselage


These in API You can find it in all of them .

版权声明
本文为[dawnsun001]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230544289553.html