'font1& = _LOADFONT("c:\windows\fonts\courbd.ttf", 20, "bold") 'courier bold
'font1& = _LOADFONT("c:\windows\fonts\times.ttf", 20, "bold") 'times bold
font1&
= _LOADFONT("c:\windows\fonts\cour.ttf", 20, "bold") 'courier regular_FONT font1&
'lets have a monospaced font - lines up better
'either put in the numbers in the puzzle separated by "," OR
'put in "." for unknowns and the numbers 2,3,4,5 for duplicates
'.2334.4N52.54 will work as will 13,8,21,21,4,16,4,N,3,8,10,3,4 [the N was a given letter]
'both will give differentiate
'when letters are given (or known) they can be excluded by loading an exclusion list
'input ! followed by the letters, this can be added to by ! [more letters] and reset by just putting in !
' **************************all duplicates MUST be put in**********************
'for crosswords this will not work!!!
PRINT "loading word list....please wait" INPUT #1, word$
(i
) 'load list into RAM it is much faster '200 PRINT "input word ";
'LINE INPUT a$
' avoid tedious task of making up how ever many words this thing wants
200 a$
= word$
(INT(RND * 319378))
f$ = a$
z$ = a$
'z$ original input string
'a$ input string with 2,3,..replaced by dots
'b$ test string from word list
exq$ = ""
b$ = word$(ii)
k2 = 0
k2 = k2 + 1
k3 = 0
k3 = k3 + 1
k4 = 0
k4 = k4 + 1
k5 = 0
k5 = k5 + 1
kdot = 0
kdot = kdot + 1
wdot
(kdot
) = MID$(b$
, i
, 1) kndot = 0
kndot = kndot + 1
wndot
(kndot
) = MID$(b$
, i
, 1) kndot1 = 0
kndot1 = kndot1 + 1
wndot1
(kndot1
) = MID$(a$
, i
, 1)
'PRINT k2; k3; w2$(1): INPUT sa$
'make sure all dots are different
'now checking if any of the dots are the same as inputted letters
'now checking for duplicates in repeated letters
'now check if any of the given letters are the same as multiples
'use exclusion list if loaded
IF INSTR(exq$
, ex1
) = 0 THEN 'lets not remove known letters
longform:
p0 = 1: kk = 0
r1$ = ""
r2$ = ""
kk = kk + 1
r1$
(kk
) = MID$(f$
, p0
, LEN(f$
) - p0
+ 1) r1$
(kk
) = MID$(f$
, p0
, p1
- p0
) p0 = p1 + 1
'PRINT r1$(nn); ASC(r1$(nn))
u1 = 0
'PRINT r1$(ii); r1$(jj), ii; jj; LEN(r1$(jj)): INPUT sa$
IF r1$
(ii
) = r1$
(jj
) THEN r1$
(jj
) = CHR$(50 + u1
) + CHR$(50 + u1
) + CHR$(50 + u1
): u2
= 99
u2 = 0
u1 = u1 + 1
f$ = ""
f$ = f$ + r1$(ii)
a$ = f$
'PRINT a$, LEN(a$)
'why does this get slower after several searches???
'changing q1$ to string*1 seems to solve it!