home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 55
/
055.d81
/
cruciverbalist
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
6KB
|
215 lines
5 poke55,0:poke56,56:clr
6 dimp$(14),w$(100):fg=0:n=0
10 poke53280,0:poke53281,0:printchr$(147)chr$(142)chr$(8)
20 print""tab(14)"[154]please wait"
21 sys57812"cross.font",8,0
22 poke780,0:poke781,0:poke782,56
25 sys65493:poke53272,21
29 printtab(13)"[145][150]loading files"
30 poke147,0:sys57812"xplayer.1",8,1:sys62631
81 printtab(12)"[145][153]and more files"
82 poke147,0:sys57812"xconstruct.r",8,1:sys62631
86 printtab(11)"[145][154] the last file "
88 poke147,0:sys57812"xdefs.r",8,1:sys62631
91 poke53272,21:print"[147][154][146]"tab(11)"the cruciverbalist"
95 print"[153]"tab(6)"loadstar's crossword program"
96 print""tab(7)"[176][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][174]"
97 printtab(7)"[221] [221]"
100 printtab(7)"[221] 1] constructor [221]"
105 printtab(7)"[221] 2] definitions [221]"
108 printtab(7)"[221] 3] player [221]"
110 printtab(7)"[221] 4] themesmith [221]"
115 printtab(7)"[221] 5] return to loadstar [221]"
120 printtab(7)"[221] [221]"
122 printtab(7)"[173][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][189]"
125 print"[156] (c) 1988 barbara schulak"
130 print" and fender tucker"
150 getk$:ifk$=""then150
160 k=val(k$):ifk<1ork>5then150
170 ifk=5then9000:rem loadstar
180 ifk=4then1000:rem themesmith
200 ifk=2thenpoke53272,31:sys24576:goto91
205 ifk=3thenpoke53272,31:sys16384:goto91
206 iffg=1thenpoke53272,31:sys20698:goto91
207 fg=fg+1:poke53272,31:sys20480
210 goto91
340 :
1000 print"[147][159]":a$=""
1005 p$(0)=" back to menu ":pq$(0)=" printer off "
1010 p$(1)=" list all words "
1015 p$(2)=" four letters "
1020 p$(3)=" five letters "
1025 p$(4)=" six letters "
1030 p$(5)=" seven letters ":pq$(1)=" printer on "
1035 p$(6)=" eight letters "
1040 p$(7)=" nine letters "
1045 p$(8)=" ten letters "
1050 p$(9)=" eleven letters "
1055 p$(10)=" twelve letters "
1060 p$(11)=" thirteen letters "
1065 p$(12)=" fourteen letters "
1070 p$(13)=" fifteen letters "
1075 m$(0)=" enter words "
1080 m$(1)=" list them "
1085 m$(2)=" save them "
1090 m$(3)=" load them "
1095 m$(4)=" cross words "
1100 m$(5)=" find word "
1105 m$(6)="back to constructor"
1110 b$=" [145]"
1115 p$(14)=pq$(0)
1120 goto1230
1125 ln=0:k$="":poke198,0
1130 poke646,int(rnd(0)*15)+1:print"[164][157]";
1135 geta$:ifa$=""then1130
1140 ifa$=chr$(13)thenprint"[159] ":return
1145 ifa$=chr$(20)andlnthenln=ln-1:k$=left$(k$,ln):goto1175
1150 ifa$=chr$(20)andln=0then1130
1154 ifflthenifa$<"a"ora$>"z"then1130
1155 ln=ln+1:ifln>lthenln=ln-1:goto1130
1165 ifa$<" "ora$>"z"ora$=chr$(34)then1130
1170 k$=k$+a$
1175 print"[155]"a$;:goto1130
1180 poke198,0:poke214,23:print
1185 print"[158] press space [159][145]"
1190 geta$:ifa$<>" "then1190
1195 return
1200 poke214,23:print:print" [158]searching[159] [145]":return
1205 n$=str$(n):n$=right$(n$,len(n$)-1):return
1210 poke214,21:print:printtab(21-(len(er$)/2))er$
1215 print#15,"i0":fort=0to2000:next
1220 return
1225 :
1230 print"[147]"tab(11)"t h e m e s m i t h[159]"
1235 fori=0to6
1240 printtab(11)m$(i):print
1245 next:k=0
1250 poke214,k*2+4:print
1255 printtab(11)""m$(k)"[145]"
1260 geta$:ifa$<>""anda$<>"[145]"anda$<>chr$(13)then1260
1265 printtab(11)m$(k)
1270 ifa$=""thenk=k+1:ifk>6thenk=0
1275 ifa$="[145]"thenk=k-1:ifk<0thenk=6
1280 ifa$=chr$(13)thenonk+1goto1290,1335,1465,1525,1585,1685,91
1285 goto1250
1290 n=n+1:gosub1205:fl=1
1292 poke214,22:print:printtab(4)"enter nothing to return to menu"
1295 poke214,19:print:printtab(13)b$
1300 printtab(8)"word #"n$": ";
1305 l=15:gosub1125
1310 ifk$=""thenn=n-1:goto1230
1315 w$(n)=k$
1320 n=n+1:gosub1205
1325 goto1295
1330 :
1335 ifn=0then1230
1336 print"[147]"tab(10)"t h e m e l i s t e r[159]"
1340 fori=0to14
1345 printtab(10)p$(i)
1350 next:p=0
1355 poke214,p+4:print
1360 printtab(10)""p$(p)"[145]"
1365 geta$:ifa$<>""anda$<>"[145]"anda$<>chr$(13)then1365
1370 printtab(10)p$(p)
1375 ifa$=""thenp=p+1:ifp>14thenp=0
1380 ifa$="[145]"thenp=p-1:ifp<0thenp=14
1385 ifa$=chr$(13)then1395
1390 goto1355
1395 ifp<>0then1410
1400 ifpqthenprint#4:close4
1405 goto1230
1410 ifp=14thengoto2000 : rem *******
1415 print"[147]":j=0:k=0
1420 ifpqthenopen4,4:cmd4
1425 fori=1ton
1430 ifp<>1theniflen(w$(i))<>p+2then1450
1435 k=k+1:ifpq=0thenifk/39=int(k/39)thengosub1180:print"[147]"
1440 j=j+1:ifj/2=int(j/2)thenprinttab(23)w$(i):goto1450
1445 printtab(3)w$(i);
1450 next
1455 gosub1180:goto1335
1460 :
1465 ifn=0then1230
1466 poke214,19:print:printb$:fl=0
1470 printtab(10)"filename:";
1475 l=15:gosub1125
1480 ifk$=""then1230
1485 open15,8,15,"i0":open2,8,2,"@0:"+k$+",p,w"
1490 print#2,n-1
1495 fori=1ton
1500 print#2,w$(i)
1505 next:close2
1510 gosub1210
1515 close15:goto1230
1520 :
1525 poke214,19:print:printb$:fl=0
1530 printtab(10)"filename:";
1535 l=15:gosub1125
1540 ifk$=""then1230
1545 open15,8,15,"i0":open2,8,2,"@0:"+k$+",p,r"
1550 input#2,nx$:n=val(nx$)
1555 fori=1ton
1560 input#2,w$(i)
1565 next:close2:input#15,er,er$
1570 gosub1210
1575 close15:goto1230
1580 :
1585 ifn=0then1230
1586 print"[147]"tab(10)"c r o s s w o r d s[159]":fl=0
1590 printtab(10)"the first length: ";:l=2:gosub1125:u=val(k$)
1595 printtab(10)"cross position: ";:l=2:gosub1125:x=val(k$)
1600 printtab(10)"the second length: ";:l=2:gosub1125:v=val(k$)
1605 printtab(10)"cross position: ";:l=2:gosub1125:y=val(k$)
1610 ifx>uory>vthen1585
1615 fori=1ton:iflen(w$(i))<>uthen1660
1620 forj=1ton:iflen(w$(j))<>vthen1657
1625 ifi=jthen1657
1630 ifmid$(w$(i),x,1)<>mid$(w$(j),y,1)then1657
1635 print"[147]"
1640 poke214,11:print:printtab(16)w$(i)
1645 poke214,11-y+1:print:printtab(15+x);
1650 fork=1tov:printmid$(w$(j),k,1)"[157]";:nextk
1651 poke198,0:poke214,23:print
1652 print" [158]press m for menu - space for more [159][145]"
1653 geta$:ifa$<>" "anda$<>"m"then1653
1654 ifa$="m"theni=n:j=n:goto1230
1655 gosub1200
1657 nextj
1660 nexti
1665 poke214,21:print:printtab(18)"[158]done":gosub1180
1670 poke214,21:print:printtab(18)" "
1675 goto1230
1680 :
1685 ifn=0then1230
1686 print"[147]"tab(10)" f i n d w o r d[159]":fl=0
1690 printtab(12)"length: ";:l=2:gosub1125:u=val(k$)
1695 printtab(12)"position: ";:l=2:gosub1125:x=val(k$)
1700 printtab(12)"letter: ";
1702 poke646,int(rnd(0)*15)+1:print"[164][157]";
1710 getk$:ifk$<"a"ork$>"z"then1702
1715 printk$
1720 fori=1ton
1725 iflen(w$(i))<>uthen1750
1730 ifmid$(w$(i),x,1)<>k$then1750
1735 print"[147][159]"
1740 poke214,11:print:printtab(16)w$(i)
1743 poke198,0:poke214,23:print
1745 print"[158] press m for menu - space for more [159][145]"
1746 geta$:ifa$<>" "anda$<>"m"then1746
1747 ifa$="m"theni=n:goto1230
1748 gosub1200
1750 next:goto1665
2000 open15,4,15:close15
2001 ifst<>0then2050
2002 pq=pq+1:pq=pqand1:p$(14)=pq$(pq):goto 1355
2050 print"[147]":poke214,10:print:print" printer not detected"
2051 print" press a key "
2055 geta$:ifa$=""then2055
2056 pq=0:p$(14)=pq$(pq):goto 1335
9000 open15,8,15,"r0:hello connect=hello connect":input#15,er:close15
9005 poke53272,21:print"[147]"
9010 ifer<>63thenend
9020 load"hello connect",8
9999 :
10000 open15,8,15,"s0:cruciverbalist":close15:save"0:cruciverbalist",8