Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Carlos Garcia
- Lesson2 Activity1
- Placing stacks of 100 beepers
- */
- package Lesson2;
- import kareltherobot.Directions;
- import kareltherobot.UrRobot;
- import kareltherobot.World;
- import java.awt.*;
- public class Activity1 implements Directions {
- public static void main(String[] args) {
- World.setDelay(1);
- World.setVisible();
- World.setBeeperColor(Color.blue);
- UrRobot zgod = new UrRobot(1, 1, North, -1);
- // loop that runs 10 times for 10 stacks
- for (int i=0; i<10; i++){
- // loop that runs 100 times for 100 beepers in each stack
- for (int j=0; j<100;j++){
- zgod.putBeeper();
- }
- zgod.move();
- }
- zgod.move();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement