02-00-ninja-says.js 1006 B

123456789101112131415161718
  1. /**
  2. Ninjas are introduced to the concept of functions by verbally instructing a
  3. "Sensei Robot" that can only perform 8 simple operations.
  4. Sensei Notes
  5. * In this activity, the Sensei will be at the board with a marker and the ninja
  6. will instruct the Sensei how to draw the ninja image.
  7. * If the Ninja asks you do perform an action that is not one of the 8 listed,
  8. then respond with "I do not know what that means."
  9. * If the Ninja uses a command, perform exactly what they ask. If they say
  10. "move up" but don't specify how long, then move up forever.
  11. * The goal is to provide a visual "anchor" for how a programmer interacts with a
  12. computer. You should be able to reference this activity in the future when you
  13. need to explain why code is behaving a certain way. For example, if a Ninja codes
  14. to move left when the left arrow is pressed but they leave out the negative sign,
  15. the computer is doing exactly what is told to do. The Ninja must alter the
  16. instructions to correct the computer's output.
  17. */