1.4.4: Slide Karel, 1.4.5: Fireman Karel
Code for these lessons:
1.4.4: Slide Karel
- public void run(){
- putBall();
- move();
- turnRight();
- move();
- putBall();
- move();
- turnLeft();
- move();
- putBall();
- }
- private void turnRight(){
- turnLeft();
- turnLeft();
- turnLeft();
- }
1.4.5: Fireman Karel
- public void run(){
- turnRight();
- move();
- move();
- move();
- turnLeft();
- }
- private void turnRight(){
- turnLeft();
- turnLeft();
- turnLeft();
- }
instead of public void run can u do something simpler
ReplyDeletewhat is it?
Deletedoes not work right!
ReplyDelete