var onezero : int
var target : int
View.Set ("graphics:470;300,position:center;center,nobuttonbar")
put " LED GAME! "
put " Please enter LED that you will attempt to hit!"
put " ( anything else to quit ) " ..
get target
cls
loop
Draw.Oval (70, 100, 50, 50, brown)
Draw.Oval (180, 100, 50, 50, brown)
Draw.Oval (290, 100, 50, 50, brown)
Draw.Oval (400, 100, 50, 50, brown)
put " You are trying to stop on LED ", target
put " Press Button to Start! "
loop
onezero := parallelget
exit when onezero = 56
end loop
delay (500)
loop
Draw.FillOval (70, 100, 50, 50, brightred)
parallelput (8)
delay (100)
Draw.FillOval (70, 100, 50, 50, white)
Draw.Oval (70, 100, 50, 50, brown)
onezero := parallelget
exit when onezero = 56
%-------------------------------------------
Draw.FillOval (180, 100, 50, 50, brightred)
parallelput (4)
delay (100)
Draw.FillOval (180, 100, 50, 50, white)
Draw.Oval (180, 100, 50, 50, brown)
onezero := parallelget
exit when onezero = 56
%-------------------------------------------
Draw.FillOval (290, 100, 50, 50, brightred)
parallelput (2)
delay (100)
Draw.FillOval (290, 100, 50, 50, white)
Draw.Oval (290, 100, 50, 50, brown)
onezero := parallelget
exit when onezero = 56
%-------------------------------------------
Draw.FillOval (400, 100, 50, 50, brightred)
parallelput (1)
delay (100)
Draw.FillOval (400, 100, 50, 50, white)
Draw.Oval (400, 100, 50, 50, brown)
onezero := parallelget
exit when onezero = 56
%-------------------------------------------
Draw.FillOval (400, 100, 50, 50, brightred)
parallelput (1)
delay (100)
Draw.FillOval (400, 100, 50, 50, white)
Draw.Oval (400, 100, 50, 50, brown)
onezero := parallelget
exit when onezero = 56
%-------------------------------------------
Draw.FillOval (290, 100, 50, 50, brightred)
parallelput (2)
delay (100)
Draw.FillOval (290, 100, 50, 50, white)
Draw.Oval (290, 100, 50, 50, brown)
onezero := parallelget
exit when onezero = 56
%-------------------------------------------
Draw.FillOval (180, 100, 50, 50, brightred)
parallelput (4)
delay (100)
Draw.FillOval (180, 100, 50, 50, white)
Draw.Oval (180, 100, 50, 50, brown)
onezero := parallelget
exit when onezero = 56
%-------------------------------------------
Draw.FillOval (70, 100, 50, 50, brightred)
parallelput (8)
delay (100)
Draw.FillOval (70, 100, 50, 50, white)
Draw.Oval (70, 100, 50, 50, brown)
onezero := parallelget
exit when onezero = 56
%-------------------------------------------
end loop
if onezero = target then
put "YOU DID IT!"
elsif (target = onezero - 1) or (target = onezero + 1) then
put "YOU JUST MISSED!"
else
put "YOU'RE WAY OFF!"
end if
exit when onezero = 56
cls
end loop
|