Robocode
Robocode is a programming game, where the goal is to develop a robot battle tank to battle against other tanks in Java or.NET. The robot battles are running in real-time and on-screen. Robocode Links - ReadMe for Robocode, which gives a good overview of Robocode - News for Robocode. Apr 23, 2020 Step 1: Download Robocode.jar(not actual name of file) from source forge Step 2: Hit Yes on Every Prompt given Step 3: Done Get a Free stock On Us! Pizza connection 3 igg games list. Sign Up for Robinhood Today!
Paint monsters level 1019. Sooo frustrating!' ,982000000,4,null,null,'0','Tina Daye',null,null,2,null,null,null,'Rauch',null,2,null,null,null,'have been playing this game for years and I love it. Everytime I tried to open it it always said app not working.
PermalinkJoin GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upBranch:master
2 contributors
/** |
* Copyright (c) 2001-2020 Mathew A. Nelson and Robocode contributors |
* All rights reserved. This program and the accompanying materials |
* are made available under the terms of the Eclipse Public License v1.0 |
* which accompanies this distribution, and is available at |
* https://robocode.sourceforge.io/license/epl-v10.html |
*/ |
packagesample; |
importrobocode.HitRobotEvent; |
importrobocode.Robot; |
importrobocode.ScannedRobotEvent; |
importjava.awt.*; |
/** |
* RamFire - a sample robot by Mathew Nelson. |
* <p> |
* Drives at robots trying to ram them. |
* Fires when it hits them. |
* |
* @author Mathew A. Nelson (original) |
* @author Flemming N. Larsen (contributor) |
*/ |
publicclassRamFireextendsRobot { |
int turnDirection =1; // Clockwise or counterclockwise |
/** |
* run: Spin around looking for a target |
*/ |
publicvoidrun() { |
// Set colors |
setBodyColor(Color.lightGray); |
setGunColor(Color.gray); |
setRadarColor(Color.darkGray); |
while (true) { |
turnRight(5* turnDirection); |
} |
} |
/** |
* onScannedRobot: We have a target. Go get it. |
*/ |
publicvoidonScannedRobot(ScannedRobotEvente) { |
if (e.getBearing() >=0) { |
turnDirection =1; |
} else { |
turnDirection =-1; |
} |
turnRight(e.getBearing()); |
ahead(e.getDistance() +5); |
scan(); // Might want to move ahead again! |
} |
/** |
* onHitRobot: Turn to face robot, fire hard, and ram him again! |
*/ |
publicvoidonHitRobot(HitRobotEvente) { |
if (e.getBearing() >=0) { |
turnDirection =1; |
} else { |
turnDirection =-1; |
} |
turnRight(e.getBearing()); |
// Determine a shot that won't kill the robot.. |
// We want to ram him instead for bonus points |
if (e.getEnergy() >16) { |
fire(3); |
} elseif (e.getEnergy() >10) { |
fire(2); |
} elseif (e.getEnergy() >4) { |
fire(1); |
} elseif (e.getEnergy() >2) { |
fire(.5); |
} elseif (e.getEnergy() >.4) { |
fire(.1); |
} |
ahead(40); // Ram him again! |
} |
} |
Copy lines Copy permalink