Welcome to Scribd. Sign in or start your free trial to enjoy unlimited e-books, audiobooks & documents.Find out more
Download
Standard view
Full view
of .
Look up keyword
Like this
1Activity
0 of .
Results for:
No results containing your search query
P. 1
jKarel Lab 05

jKarel Lab 05

Ratings: (0)|Views: 64|Likes:
Published by David W.

More info:

Categories:Types, School Work
Published by: David W. on Mar 12, 2012
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less

03/12/2012

pdf

text

original

 
 //Name David Willmore Date 2 Dec. 2011importedu.pace.World;importedu.pace.Robot;public classRacerextendsAthlete {publicRacer(inty) {super(1,y,World.EAST,World.INFINITY);}// Racerpublic voidjumpRight() {turnLeft();move();turnRight();move();turnRight();move();turnLeft();}// jumpRight()public voidjumpLeft() {turnRight();move();turnLeft();move();turnLeft();move();turnRight();}// jumpLeft()public voidsprint(intn) {for(intk = 1; k <= n; k++) move();}// sprintpublic voidpickPile(intn) {for(intk = 1; k<= n; k++) pickBeeper();}// putpublic voidputPile(intn) {for(intk = 1; k <= n; k++) putBeeper();}// pick}// class
 
 //Name David Willmore Date 2 Dec. 2011importedu.pace.World;importedu.pace.Robot;public classLab05 {public static voidshuttle(Racer arg) {arg.move();arg.jumpRight();arg.sprint(2);arg.pickPile(7);arg.sprint(2);arg.pickPile(5);arg.sprint(2);arg.pickPile(3);arg.turnAround();arg.sprint(6);arg.jumpLeft();arg.sprint(1);arg.putPile(15);arg.turnAround();arg.sprint(1);}// shuttlepublic static voidmain(String[] args) {World.readWorld("shuttle");World.setSize(10, 10);World.setSpeed(15);Racer ted =newRacer(1);Racer kim =newRacer(4);Racer jen =newRacer(7);shuttle(ted);shuttle(kim);shuttle(jen);}// main}// class

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->