Note: The adjust procedures moves the turtle to the closest x
and y coordinate that’s a multiple of 40. Since the turtle’s shape is 40
turtle steps by 40 turtle steps, adjust will line up the turtles exactly
side by side.
2. Click once on shape 13 and then on your turtle. The turtle should turn into a box.
3. Right click or eye ball this turtle and type Adjust as its instruction.
[Drag the puzzle piece turtle anywhere on the screen, then click on it. The turtle should shift its position sightly as it moves into the grid. Drag it again, click, and watch it shift again.]
Step 3: Make 16 puzzle titles
This turtle, with its square shape and adjust instruction, is the first puzzle piece. Now you need 15 more just like it. Make 16 copies of your current turtle:
Now arrange the grid: drag one turtle to where you want one of the corners of the puzzle to be, and click on it. It will shift into place.
Now drag each of the other turtles into a 4 by 4 grid. Don’t worry about lining them up perfectly -- adjust will straighten them all out in a moment.
Drag around all the turtles to select them. While they are all selected, click on one of them. Each one will run adjust and snap into place.
If it looks like you’re missing a turtle, two turtles have probably snapped into the same place, and are sitting one above the other. Move the turtles nearest to the missing one, and you’ll find the lost turtle. Click on each one separately to pop them back into place.
Step 4: Choose a Picture for the Puzzle
Your picture can be any graphic design that fits the square grid of 16 turtles. It could be:
The snapshape command tells a turtle to take a “snapshot of the graphic underneath it and use it for the turtle’s shape.
There are 16 turtles in your puzzle, and each one has to snapshape the section of picture underneath it. It’s much easier to write a procedure to do the work -- that way, when you want to make a new puzzle the work will be done.
Write a snapall procedure. It will have 16 lines, one line for each turtle’s snapshape instruction. Instead of typing each line, use copy and paste:
t1, setsh 13 snapshape
t2, setsh 14 snapshape
t3, setsh 15 snapshape
t4, setsh 16 snapshape
t5, setsh 29 snapshape
t6, setsh 30 snapshape
t7, setsh 31 snapshape
t8, setsh 32 snapshape
t9, setsh 45 snapshape
t10, setsh 46 snapshape
t11, setsh 47 snapshape
t12, setsh 48 snapshape
t13, setsh 61 snapshape
t14, setsh 62 snapshape
t15, setsh 63 snapshape
t16, setsh 64 snapshape
Press CTRL + F
Type in the command center:
In an instant, the “tile” shape should have disappeared and turned into pieces of your graphic. Now drag all the puzzle-piece turtles away. Clear the graphic image on your screen by using the clean command. Type in the command center:
(Clean clears the page but leaves the turtles as they are)
Step 5: Scatter the Puzzle Pieces
How about strewing puzzle pieces all over the page? Write a procedure to do it, so you won’t know where the pieces went. Solving the puzzle will be much more interesting. Try this procedure (CTRL + F):
everyone [ seth random 360 fd 50 + random 200 ]
Create a button called Scatter
Now you try it.
|See the awesome GAMES other Crews students have created and published. Click Here||Do you know where a real Jigsaw
Puzzle game is on the web?
This site was created by Roderick
for the primary purpose of teaching and demonstrating computer skills..
Any distribution or copying without the express or written consent of
Alton C. Crews Middle School or its creator is strictly prohibited.
Copyright© 1998. Alton C. Crews Middle School: CS