Warning: include(/home/mathwa6/public_html/php_include/forum_left_side.php) [function.include]: failed to open stream: No such file or directory in /home/mathwa6/public_html/php_include/ontheLeft_moris.php on line 296
Warning: include() [function.include]: Failed opening '/home/mathwa6/public_html/php_include/forum_left_side.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/mathwa6/public_html/php_include/ontheLeft_moris.php on line 296
Before you do anything with Jeroo, watch the youtube video below.
method main(){
//create a new Jeroo called tom
// tom should start in row 2 and colum 3
// tom is facing East and has 10 flowers
//to plant
Jeroo tom = new Jeroo(2, 3, EAST, 10);
//drop 1
tom.hop();
tom.plant();
//drop 2
tom.hop();
tom.plant();
//drop 3
tom.hop();
tom.plant();
//drop 4
tom.hop();
tom.plant();
//drop 5
tom.hop();
tom.plant();
//tom has to get himself
// back to the center
//of the line by turning
// LEFT twice and hopping twice,
// and then turning LEFT again
tom.turn(LEFT);
tom.turn(LEFT);
tom.hop();
tom.hop();
tom.turn(LEFT);
//tom now needs to hop and drop 5 times
//drop 6
tom.hop();
tom.plant();
//drop 7
tom.hop();
tom.plant();
//drop 8
tom.hop();
tom.plant();
//drop 9
tom.hop();
tom.plant();
//drop 10
tom.hop();
tom.plant();
}