Word Wheels

To make 9-letter wordwheels I downloaded a SOWPODS dictionary and scanned to a new file all the words of this length.

I then wrote some code to check words I thought exist agains this 9-letter dictionary.

    open "sowpods.txt" for input as #fIn
        dictionary$ =input$( #fIn, lof( #fIn))
    close #fIn

    for i =1 to 5
        input possibleWord$
        p$ =chr$( 10) +possibleWord$ +chr$( 10)
        if instr( dictionary$, p$) then
            print " "; possibleWord$; " exists in Sowpods."
        else
            print "    NO "; possibleWord$; " exists."
        end if
    next i

    print "End."
end

This produces user-interactions like..

?tryptich
    tryptich does not exist.

?tri[tych tri[tych does not exist.

?triptych triptych exists in Sowpods.

?diptych diptych exists in Sowpods.

?monotych monotych does not exist.

End.

My morning rituals include reading the daily paper, doing the quick crossword, wordsearch and word wheel. Wordwheels have 9 letters and these can make at least one nine-letter word. You can extend to trying to find the maximum number of words possible with fewer letters, but always using the centre letter and at least two others.

My aim was to use the SOWPODS Scrabble dictionary, but so many words make LB excessively slow or crash it.

Anyway, here's an easy way to generate a puzzle for friends and family, with YOU choosing a nine letter word to use.


nomainwin


UpperLeftX = 100
UpperLeftY = 100
WindowWidth = 300
WindowHeight = 340

graphicbox #w.gb1, 12, 14, 260, 260

pi =3.14159265

global toFind$


open "Word Wheel." for window as #w

#w "trapclose quit"
#w.gb1 "down ; size 3"

#w.gb1 "fill white"
#w.gb1 "font 20 bold"
#w.gb1 "up ; goto 130 130 ; down ; backcolor white ; circle 120"

r =120

for theta =0 to 135 step 45
#w.gb1 "up ; goto "; 130 +120 *sin( theta *pi /180); " "; 130 +120 *cos( theta *pi /180)
#w.gb1 "down ; goto "; 130 -120 *sin( theta *pi /180); " "; 130 -120 *cos( theta *pi /180)
next theta

#w.gb1 "up; goto 130 130 ; down ; circlefilled 45"

toFind$ ="RECTANGLE"

for i =1 to 8
theta =22 +i *45
#w.gb1 "up ; goto "; 115 +80 *sin( theta *pi /180); " "; 145 +80 *cos( theta *pi /180)
#w.gb1 "down"
#w.gb1 "\"; getChar$()
next i

#w.gb1 "up ; goto 115 145"
#w.gb1 "down"
#w.gb1 "\"; getChar$()

#w.gb1 "flush ; getbmp scr 0 0 256 256"
bmpsave "scr", "wordwheel.bmp"

wait

function getChar$()
L =len( toFind$)
pick =int( 1 +L *rnd( 1))
getChar$ =mid$( toFind$, pick, 1)
toFind$ =left$( toFind$, pick -1) +mid$( toFind$, pick +1)
end function

sub quit h$
close #h$
end
end sub