Hello i made a project wit my gr
package CTJ;
import robocode.*;
/**/
public class Firsty extends Robot <!--part 1-->
{
public static final int MAX_HITS = 3;
public static final int TIMER = 3;
double lastBearing = 0;
int hitCounter = 0;
int myTimer = TIMER;
public void run() {
while(true) {
myTimer = myTimer - 1;
ahead(lastBearing);
turnGunRight(360);
back(100);
turnGunRight(lastBearing + 90);
if(myTimer == 0) {
if(hitCounter > MAX_HITS) {
runLikeHell();
} else {
hitCounter = 0;
myTimer = TIMER;
}
}
}
}
public void onScannedRobot(ScannedRobotEvent e) { <!--PART 2-->
fire(10);
back(5);
}
public void onHitByBullet(HitByBulletEvent e) {
turnLeft(90 - e.getBearing());
lastBearing = e.getBearing();
hitCounter = hitCounter + 1;
}
public void onHitWall(HitWallEvent e) { <!--PART 3-->
turnRight(e.getBearing() + 153);
}
public void runLikeHell() {
out.println("evading....");
turnLeft(172);
ahead(500);
hitCounter = 0;
myTimer = TIMER;
}
}
n the gitlab. i already create the project and i alredy invite them but i dont know how to put the code in, i have the file on my desktop, but i dont know how to use gitlab i dont know the basic stuffs about it i have the gitbash on my computer i use windows can someone help me with it. if possible use screenshot so i can se step by step
This is my code