An open API service indexing awesome lists of open source software.

https://github.com/chunrapeepat/robocode

The Robot Of Robocoding created by Chunza2542
https://github.com/chunrapeepat/robocode

Last synced: 8 months ago
JSON representation

The Robot Of Robocoding created by Chunza2542

Awesome Lists containing this project

README

          

# 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));