Home
Project Folders
Teacher Resources
Student Resources
En ESPAÑOL
How Do I?
Literacy
MWForum
Site Map
Search
Our Team

fortune telling bones 1 2
Fortune Telling Bones 2
Screenshot
Turtle Face Get Web Player
  if you cannot see the project


Goal:   A magic bone answers a random question or a question you type.




Vocabulary:   if not empty?

Code
Project Map

to startup
clean
everyone [ht setpensize 2 setc 0]
questions, hidetext
text1, hidetext
opaque "text1
ct
setfont "Arial
setfontsize 14
settc 9
end

to choose_a_question
startup
text1, settc 30
insert textpick "questions
transparent "text1
showtext
end

to write_a_question
startup
text1, settc 9
showtext
end

to crack_the_bone
clean
text1, hidetext
opaque "text1
text1, top select bottom
settc 30
if not empty? text1 [transparent "text1
showtext]
ask [t1 t2] [pu setpos [0 60]]
ask [t3 t4] [pu setpos [0 30]]
ask [t1 t3] [ repeat 3 [seth 75 + random 30 pd fd random 70] ]
ask [t2 t4] [ repeat 3 [seth -75 - random 30 pd fd random 70] ]
end

to show_questions
questions, showtext
end

to hide_questions
questions, hidetext
end



Notes

This project gives you the choice of random questions or writing your own question (in black letters in a white text box).   In either case, when you click crack_the_bone, the question is shown in white on the bone just before the bone cracks.

  1. There are several changes in the procedures so that text1 can display a random question or can display a white text box for writing in and then display white letters transparently.
    You cannot make a text box transparent if there is nothing inside of it.   If the user forgets to choose a question or type a question, text1 will be empty.
    if not empty? text1 [transparent "text1 showtext] means: "If text1 is not empty, then make it transparent and visible.   Otherwise, go on to the next command."

  2. Each turtle draws three line segments of random lengths at random angles.

(As in Fortune Telling Bone 1, be sure to freeze your drawing with freezebg so that your bone will not get erased when you erase the cracks.)




What If?
See what happens if you click the write_a_question button and then crack the bone without first writing a question.
Try different numbers after setpensize.
Try different line colors.


Challenge
Add more turtles and change the cracking procedure so that there are three cracks instead of two.




© copyright 2001 - 2008  OpenWorld Learning.   All rights reserved.