Overview

Learning Objectives

Evidence Statements

Product Outcomes

Materials

Pens/pencils for the students, fresh whiteboard markers for teachers

Class poster (List of rules, design recipe, course calendar)

Editing environment (WeScheme or DrRacket with the bootstrap-teachpack installed)

Student workbooks

Language Table

Cutouts of Cat and Dog images

Cutouts of Pythagorean Theorem packets [1, 2] - 1 per cluster

The Ninja World 5 file [NW5.rkt from source-files.zip | WeScheme] preloaded on students’ machines

Preparation

Seating arrangements: ideally clusters of desks/tables

Right now, in both Ninja World and your games, nothing happens when the player collides with another game character. We need to write a function change that. This is going to require a little math, but luckily it’s exactly the same as it was in Bootstrap:1.

In the image above, how far apart are the cat and dog?

If the cat was moved one space to the right, how far apart would they be?

What if the cat and dog switched positions?

In one dimension, such as on a number line, finding the distance is pretty easy. If the characters are on the same line, you just subtract one coordinate from another to find the distance. However, if all we did was subtract the second number from the first, the function would only work half the time!

When the cat and dog were switched, did you still subtract the dog’s position from the cat’s, or subtract the cat’s position from the dog’s? Why?

Draw the number line on the board, with the cutouts of the cat and dog at the given positions. Ask students to tell you the distance between them and move the images accordingly. Having students act this out can also work well: draw a number line, have two students stand at different points on the line, using their arms or cutouts to give objects of different sizes. Move students along the number line until they touch, then compute the distance on the number line.