Code: Select all
option base 1 ! randomize() ! nw=10
graphics ! graphics clear
set buttons font size 100 ! draw font size 80 ! draw color 0,0,1
dim words$(nw),jump(9,2)
for i=1 to 9 ! for j=1 to 2 ! read jump(i,j) ! next j ! next i
for i=1 to nw ! read words$(i) ! next i
data 6,8, 7,9, 4,8, 3,9, 0,0, 1,7, 2,6, 1,3, 2,4
for i=1 to 9
x=150+150*((i-1)%3) ! y=150+150*floor((i-1)/3)
button i text "" at x,y size 120,120
next i
button 5 text "🌑" ! set buttons font size 30
button "show" text "show word" at 370,750 size 200,80
button "next" text "next one" at 150,750 size 200,80
do
dim stat(9) ! graphics clear
k=1+rnd(nw) ! word$=words$(k)
for i=1 to 8 ! letter$(i)=mid$(word$,i,1) ! next i
do ! pt=1+rnd(9) ! until pt<>5
for i=1 to 8
stat(pt)=1 ! a=jump(pt,1) ! b=jump(pt,2)
button pt text letter$(i)
if stat(a)=0 and stat(b)=0 then
if rnd(1)<.5 then pt=a else pt=b
continue
end if
if stat(a)=0 then ! pt=a ! continue ! end if
if stat(b)=0 then ! pt=b ! continue ! end if
next i
do slowdown
if button_pressed("show") then draw text word$ at 180,620
until button_pressed("next")
until forever
data "earliest","treasure","transits","narrator","erasures"
data "interior","interest","irritant","disaster","loiterer"
end