On opencard
OMath Open without menu   44 , 49 , 470, 341
OMath Menu Grid 32
OMath NoSave
 if game_on is not 1 then
if  onlyonetime108 is not 999 then
play circular
   put 2 into ntx
   naratoranimex
   wait 1 seconds
put 999 into onlyonetime108
end if

-- play cakewo
--put 3 into ntx
--naratoranimex
  play bokuwo
   put 5 into ntx
   naratoranimex
wait 30 ticks

  end if
  put 108 into presentcard
put 0 into init108

End Opencard


On move_object
OMath Menu Move
end move_object

On find_length
OMath Menu Length
End find_length

On find_angle
OMath Menu AngleSize
End find_angle




On Cancellation
OMath Menu Undo
End Cancellation

On idle

OMath  Put Value of ang_10001 into white
put int((white/360)*100+0.5) into white120
OMath Put Value of ang_10002 into purple
put int( (purple/360)*100 + 0.5) into purple120
OMath Put Value of ang_10003 into brown
put int((brown/360)*100 + 0.5) into brown120
OMath Put Value of ang_10004 into green
put int((green/360)*100+ 0.5) into green120
OMath Put Value of ang_10005 into red
put int((red/360)*100+ 0.5) into red120

OMath Set LabelValue x , 0, white120
OMath Set LabelValue y , 0, purple120
OMath Set LabelValue z , 0, brown120
OMath Set LabelValue A , 0, green120
OMath Set LabelValue B , 0, red120


end idle

----------------

On GameStart

put random(7) into rdm

if rdm = 1 then
 QuizDlg17 "Make a circular graph to reflect 5 W, 20 P, 10 Y, 5 G, 10 R.",%white120% , 10,%purple120%, 40, %brown120%, 20, %green120%,10, %red120%, 20
end if

if rdm = 2 then
 QuizDlg17 "Make a circular graph to reflect 3 W, 1 P, 2 Y, 3 G, 1 R.",%white120%,30, %purple120%, 10, %brown120%, 20, %green120%,30, %red120%,  10
end if

if rdm = 3 then
 QuizDlg17 "Make a circular graph to reflect 5 W, 4 P, 7 Y, 1 G, 3 R.",%white120%,25, %purple120%, 20, %brown120%, 35, %green120%, 5, %red120%,  15
end if


if rdm = 4 then
 QuizDlg17 "Make a circular graph to reflect 80 W, 20 P, 30 Y, 40 G, 30 R.",%white120%,40, %purple120%,10, %brown120%, 15, %green120%, 20, %red120%,  15
end if


if rdm = 5 then
 QuizDlg17 "Make a circular graph to reflect 35 W, 25 P, 10 Y, 20 G, 10 R.",%white120%, 35, %purple120%, 25, %brown120%,10, %green120%,20, %red120%,  10
end if

if rdm = 6 then
 QuizDlg17 "Make a circular graph to reflect 8 W, 20 P, 9 Y, 3 G, 10 R.",%white120%,16, %purple120%,40, %brown120%,18, %green120%,6, %red120%,  20
end if


if rdm = 7 then
 QuizDlg17 "Make a circular graph to reflect 2 W, 1 P, 2 Y, 3 G, 2 R.",%white120%, 20, %purple120%, 10, %brown120%, 20, %green120%, 30, %red120%, 20
end if







      repeat while quiz_quit = 0
OMath  Put Value of ang_10001 into white
put int((white/360)*100+0.5) into white120
OMath Put Value of ang_10002 into purple
put int( (purple/360)*100 + 0.5) into purple120
OMath Put Value of ang_10003 into brown
put int((brown/360)*100 + 0.5) into brown120
OMath Put Value of ang_10004 into green
put int((green/360)*100+ 0.5) into green120
OMath Put Value of ang_10005 into red
put int((red/360)*100+ 0.5) into red120

OMath Set LabelValue x , 0, white120
OMath Set LabelValue y , 0, purple120
OMath Set LabelValue z , 0, brown120
OMath Set LabelValue A , 0, green120
OMath Set LabelValue B , 0, red120

        wait 1 ticks
      end repeat
      put 0 into quiz_quit
  if math_answer is not 1 then
       if math_answer is  -1 then
          play  uhoh2


          exit GameStart
       else
              play jawharp
          showwitch_surprised
      end if

   else
           play good
           show_frog_good


 

  end if


End Gamestart










