Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- package randomwalk;
- import diuf.iip_lib.Canvas;
- import diuf.iip_lib.Random;
- import diuf.iip_lib.Turtle;
- import java.awt.Color;
- /**
- *
- * @author Joel
- */
- public class RandomWalk {
- /**
- * @param args the command line arguments
- */
- public static void main(String[] args) {
- Canvas canvas = new Canvas(500, 500);
- Turtle turtle = new Turtle(canvas);
- Random random = new Random();
- int angle = random.nextInt(360);
- turtle.right(angle);
- random.nextInt();
- turtle.forward(360);
- Color drawColor = new Color(random.nextInt(256), random.nextInt(256), random.nextInt(256));
- // TODO code application logic here
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement