Monday, 21 November 2011

lol

import edu.dat.GenericRobot;
import edu.dat.HeavyTankRobot;


public class AutomatedTank extends HeavyTankRobot {

//set up for robot tank
public static void main(String[] args) {
  AutomatedTank Abot = new AutomatedTank ("127.0.0.1","http://images.wikia.com/gtawiki/images/4/41/Tank-GTA2.png"); 
}
//loop set up
public AutomatedTank (String ip,String url){
  super (ip,url);
  while(true);{
  this.setRadarBeamDirection(0);
  this.setRadarBeamWidth(180);
  }
 
}
 




 void engageForwardGear();
 void engageReverseGear();


 void turnRight();
 void turnLeft();
 void accelerate();
 void decelerate();

this.turnLeft();
this.accelerate();

if (this.isTouchingWall()) this.decelerate();
if (this.getSpeed()==0) this.engageReverseGear();
If (this.ping() != -1) this.fire()



No comments:

Post a Comment