Created
November 6, 2010 11:55
-
-
Save mrkschan/665359 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import robocode.util.Utils; | |
import robocode.JuniorRobot; | |
public class Example extends JuniorRobot { | |
public void random_movement() | |
{ | |
// get a random (X, Y) coordinate to move | |
gotoCoordinate( | |
Utils.getRandom().nextInt(fieldWidth), | |
Utils.getRandom().nextInt(fieldHeight) | |
); | |
} | |
: | |
: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment