Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package Ex4;
- import java.awt.event.*;
- import fyw.turtles.*;
- public class RandomTurtleController implements ActionListener {
- private Turtle t;
- public RandomTurtleController(Turtle t){
- t = new Turtle();
- }
- public static void randomMovement(Turtle t){
- t.move((Math.random()-90) + (Math.random() * 180));
- t.turn((Math.random() * 10)+(Math.random() * 15));
- }
- }
Add Comment
Please, Sign In to add comment