Guest User

Untitled

a guest
Jul 17th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. package Ex4;
  2.  
  3. import java.awt.event.*;
  4. import fyw.turtles.*;
  5. public class RandomTurtleController implements ActionListener {
  6.  
  7. private Turtle t;
  8.  
  9. public RandomTurtleController(Turtle t){
  10. t = new Turtle();
  11. }
  12. public static void randomMovement(Turtle t){
  13. t.move((Math.random()-90) + (Math.random() * 180));
  14. t.turn((Math.random() * 10)+(Math.random() * 15));
  15. }
  16. }
Add Comment
Please, Sign In to add comment