levitate's Code

Created by: Susan Rodger

world

Events

When the world starts
Do:
world.my first method


Methods

  world.my first method ( )
    No variables
       iceSkater.upperBody.chest.rightShoulder.arm turn backward 0.25 revolutions
  For all world.subjects , every item_from_subjects together
       item_from_subjects turn left 2 revolutions
  iceSkater.upperBody.chest.rightShoulder.arm turn backward 0.25 revolutions
  For all world.subjects , one item_from_subjects at a time
       item_from_subjects move up ( iceSkater.differenceInHeight subject = item_from_subjects )
  iceSkater.upperBody.chest.rightShoulder.arm turn forward 0.25 revolutions
  For all world.subjects , every item_from_subjects together
       If ( item_from_subjects is taller than iceSkater )
       item_from_subjects move down ( ( ( iceSkater.differenceInHeight subject = item_from_subjects ) * 2 ) )
  Else
  Do Nothing


iceSkater

Functions

  Number iceSkater.differenceInHeight ( [Obj] subject)
    No variables
       If ( iceSkater is taller than subject )
       Return ( ( ( subject = iceSkater 's height ) - ( subject = subject 's height ) ) )
  Else
    Return ( ( ( subject = subject 's height ) - ( subject = iceSkater 's height ) ) )
Return 1