[Home]Trigon

Robo Home | Changes | Preferences | AllPages

Showing revision 2
package cx.femto;

import robocode.*; /**

 * @author iiley
 * code size 34
 * version 1.0:a Trigon movement
 * version 1.1:change to a hexagon like movement
 */
public class Trigon extends AdvancedRobot {

    public void run()
    {
    	setTurnGunRight(Double.POSITIVE_INFINITY);
		while(true){
           turnRightRadians?(1);
		   ahead(200);
		}
    }

    public void onScannedRobot(ScannedRobotEvent e) {
		setFire(3d);
    }
} </pre>

Robo Home | Changes | Preferences | AllPages
Edit revision 2 of this page | View other revisions | View current revision
Edited September 15, 2003 11:04 EST by Iiley (diff)
Search: