Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package Lesson3Activity4;
- import kareltherobot.UrRobot;
- import kareltherobot.World;
- //Basic elements that make up a constructicon
- public class Constructicons extends UrRobot{
- /**
- * Constructor for constructicons class
- * @param a
- * @param s
- * @param d
- * @param b
- * @ return - none
- */
- public Constructicons(int a,int s, Direction d, int b){
- super(a,s,d,b);
- }
- /**
- * ALlows robot to turn right
- * @ param - none
- * @ return - void
- */
- public void turnRight(){
- int delay = World.delay();
- World.setDelay(0);
- turnLeft();
- turnLeft();
- World.setDelay(delay);
- turnLeft();
- }
- /**
- * Build method that other classes are overriding
- * @ param - none
- * @ return - void
- */
- public void build(){
- turnOff();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement