Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.07 KB | None | 0 0
  1. /*
  2.  * To change this license header, choose License Headers in Project Properties.
  3.  * To change this template file, choose Tools | Templates
  4.  * and open the template in the editor.
  5.  */
  6. package randomwalk;
  7. import diuf.iip_lib.Canvas;
  8. import diuf.iip_lib.Random;
  9. import diuf.iip_lib.Turtle;
  10. import java.awt.Color;
  11.  
  12. /**
  13.  *
  14.  * @author Joel
  15.  */
  16. public class RandomWalk {
  17.  
  18.     /**
  19.      * @param args the command line arguments
  20.      */
  21.     public static void main(String[] args) {
  22.         Canvas canvas = new Canvas(500, 500);
  23.         Turtle turtle = new Turtle(canvas);
  24.        
  25.         Random random = new Random();
  26.         int angle = random.nextInt(360);
  27.         turtle.right(angle);
  28.        
  29.         random.nextInt();
  30.         turtle.forward(360);
  31.        
  32.        
  33.        
  34.      
  35.         Color drawColor = new Color(random.nextInt(256), random.nextInt(256), random.nextInt(256));
  36.        
  37.        
  38.        
  39.        
  40.        
  41.      
  42.        
  43.      
  44.        
  45.        
  46.        
  47.        
  48.        
  49.         // TODO code application logic here
  50.     }
  51.    
  52. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement