Skip to content

chunrapeepat/Robocode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

Robocode

The Robot created by Chunza2542 (Chun Rapeepat)

  • Usage [Installation the robot]
    import robocode.util.Utils; public class extends AdvancedRobot
  • Methods [Methods description]
    -setAdjust ... For ... Turn(true); //Sets the .... to turn independent from the ..... turn.
    -getX(), getY // get x,y left bottom is (0,0)
    -getBattleFieldWidth(),getBattleFieldHeight() //Get width & Height of BattleField
    -getRadarTurnRemaining() //Returns the angle remaining in the radar's turn, in radians. This call returns both positive and negative values. Positive values means that the radar is currently turning to the right. Negative values means that the radar is currently turning to the left.
    -execute() //continues executing actions that are in process. This call returns after the actions have been started.
    -Utils.normalRelativeAngleDegrees // -180 to 180
    -Utils.normalRelativeAngleDegrees // -180 to 180

EX.//เซ็ตตัวแปร "องศาที่เรดาร์จะต้องหมุนเพิ่ม" ให้เท่ากับ
double radarTurn =
// องศาที่ตัวหุ่นยนต์ของเราหันอยู่เมื่อเทียบกับสนามรบ + องศาที่จุดค้นพบศัตรูเทียบกับองศาที่ตัวหุ่นยนต์เราหันอยู่
getHeadingRadians() + e.getBearingRadians()
// ลบด้วยองศาที่เรดาร์กำลังหันไปอยู่
- getRadarHeadingRadians();
//หมุนเรดาร์ไปทางขวาตามค่าของตัวแปร "องศาที่เรดาร์จะต้องหมุนเพิ่ม"
setTurnRadarRightRadians(Utils.normalRelativeAngle(radarTurn));

About

The Robot Of Robocoding created by Chunza2542

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages