parametersChallenge's Code

Created by: SHR

world

Events

When the world starts
Do:
world.my first method


When is clicked on anything
Do:
bunny.eat ( object under mouse cursor )


Methods

  world.my first method ( )
    No variables
       bunny say I'm hungry!! Let's eat!


bunny

Methods

  bunny.eat ( [Obj] thing)
    No variables
       // Right now the bunny will only visit the carrot and eat it no matter what is clicked on
  // Edit this method so any of bunny's treats can be clicked on and he can eat them!
  // WARNING: Bunny only likes healthy treats! He should not eat any cookies!
  // Add an EVENT to run the bunny.eat event when a treat is clicked on!
  bunny turn to face thing
  bunny move ( ( ( bunny distance to thing ) - 1 ) ) toward target = world
  If ( thing == cookie )
       bunny say That's no good!
  Else
    If ( cookie2 == thing )
       bunny say That's no good!
  Else
    If ( cookie3 == thing )
       bunny say That's no good!
  Else
    If ( ground == thing )
       bunny say That's no good!
  Else
    bunny turn forward .18 revolutions
  thing set isShowing to false duration = 0 seconds
  bunny turn backward 0.18 revolutions