Advertisement
GARC923

Untitled

Sep 13th, 2022
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.64 KB | None | 0 0
  1. /*
  2. Carlos Garcia
  3. Lesson2 Activity2
  4. Linear growth
  5. */
  6.  
  7. package Lesson2;
  8.  
  9. import kareltherobot.Directions;
  10. import kareltherobot.UrRobot;
  11. import kareltherobot.World;
  12.  
  13. import java.awt.*;
  14.  
  15. public class Activity2 implements Directions {
  16.  
  17.     public static void main(String[] args) {
  18.         World.setDelay(1);
  19.         World.setVisible();
  20.         World.setBeeperColor(Color.blue);
  21.  
  22.         UrRobot zgod = new UrRobot(1, 1, North, -1);
  23.  
  24.         for (int i=10; i<=100; i+=10){
  25.             for (int j=0; j<i;j++){
  26.                 zgod.putBeeper();
  27.             }
  28.             zgod.move();
  29.         }
  30.         zgod.setVisible(false);
  31.  
  32.     }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement