package jj;
import robocode.*;
import java.awt.Color;

public class JJNo1 extends Robot
{
	public void run() {
setColors(Color.yellow,Color.blue,Color.red);
	
			ahead(70);
			turnGunRight(180);
			back(100);
			turnGunRight(360);
	
	}

	/**
	 * onScannedRobot: What to do when you see another robot
	 */
	public void onScannedRobot(ScannedRobotEvent e) {
		fire(1);
	}

	/**
	 * onHitByBullet: What to do when you're hit by a bullet
	 */
	public void onHitByBullet(HitByBulletEvent e) {
		turnLeft(90 - e.getBearing());
	}
	
}
Hosted by www.Geocities.ws

1