home *** CD-ROM | disk | FTP | other *** search
/ ftp.whtech.com / ftp.whtech.com.7z / ftp.whtech.com / articles / Sughrue / wordhunt.txt < prev   
Encoding:
Text File  |  2006-10-19  |  9.7 KB  |  371 lines

  1.  .IF DSK1.C3
  2.  
  3.  .CE 2
  4.  
  5.      *IMPACT/99*
  6.  
  7.      by Jack Sughrue
  8.  
  9.      
  10.  
  11.      XB SPEED    
  12.  
  13.  
  14.  .IF DSK1.C2
  15.  
  16.      
  17.  
  18.      
  19.  
  20.      WORD HUNTING
  21.  
  22.      
  23.  
  24.  Puzzles are a word-processing tool we
  25.  often forget about.  Although I'm not
  26.  much of a word hunt person (word
  27.  search, find-a-word, whatever), my
  28.  fifth-grade students are.  I prefer
  29.  crosswords or cryptograms, but
  30.  wordhunts have their value.  They are
  31.  also a very pleasant way to introduce
  32.  the names of bones in the human
  33.  skeleton or the Presidents or
  34.  geometrical terms.  Computers are
  35.  great teacher helpers in these
  36.  matters.  All one has to do is find a
  37.  puzzle-creator program from somewhere
  38.  and type in the words.  The sorting
  39.  and placement and completion of the
  40.  puzzle is done by our 99.  So is the
  41.  making of hardcopies of puzzle,
  42.  wordlist, answers.  It's so easy.
  43.  But not always so quick.
  44.  
  45.      Way back in 1982 WORD SAFARI
  46.  was programmed for TI.  It's amazing
  47.  how many people own it but never use
  48.  it.  Most people got it with OLDIES
  49.  BUT GOODIES before they got printers
  50.  or disk drives.  By the time they got
  51.  these things they'd long since
  52.  forgotten this puzzle gem.
  53.  
  54.      I have six word hunt programs, PD
  55.  and commercial, but there was always
  56.  a few things about WS that appealed
  57.  to me.  (The "thinking numbers" on
  58.  the lower right screen, for one.)
  59.  Though it was soundless and colorless
  60.  and was SLOW BASIC and had very poor
  61.  printouts, the program had a
  62.  structure I liked.  The way the menu
  63.  operation worked appealed to me.
  64.  
  65.      I decided to use that original
  66.  structure to make a more modern
  67.  version of this puzzle, suited for
  68.  disk.  First it had to be XB for
  69.  speed and because I don't know
  70.  assembly.  Then it had to have a
  71.  continuing music pattern while the
  72.  reading was going on internally.  It
  73.  also had to have color.  And some
  74.  better screen directions.  And much
  75.  better hardcopies (enlarged, double
  76.  strike, etc.) with a better overall
  77.  look.  It also had to be drastically
  78.  reduced in size, though XB would take
  79.  care of some of that automatically.
  80.  
  81.      I printed out all six of my word
  82.  hunt puzzles to see what features I
  83.  wanted for this new one and how I
  84.  could most efficiently program it.
  85.  It was fun.  Besides the menu
  86.  operation, I found the sizes offered
  87.  were excellent for the different
  88.  kinds of things I planned to do in my
  89.  classroom.  Each of the programs
  90.  presented me with interesting
  91.  concepts and interesting problems.
  92.  However, after three days (nights,
  93.  actually) I had a debugged version
  94.  which satisfied me.  Then, as I do
  95.  with all programs, I gave it to some
  96.  adults and some kids to play with.
  97.  The input from them helped me fine
  98.  tune the project.  I then (as I
  99.  always do) put it away for a couple
  100.  weeks.
  101.  
  102.      Later, I took the "worker" disk
  103.  out of storage, turned on my Gemini,
  104.  and set out to do my first "official"
  105.  school puzzle: names of dinosaurs
  106.  (thus I had to use the large
  107.  square).
  108.  
  109.      Perfect.
  110.  
  111.      I made 27 copies of the puzzle
  112.  and word list for the kids and one
  113.  copy of the answers for me.  FAST!
  114.  
  115.      Then I put this right on my
  116.  FUNLPLUS! and was ready to use it
  117.  whenever I word processed.  Very
  118.  handy.  I since have added a few
  119.  subprograms from Jim Peterson's
  120.  wonderful NUTS 'n BOLTS disk which
  121.  will not appear in the succinct piece
  122.  below.
  123.  
  124.  
  125.      Anyway, I'm not permitted to
  126.  print the six original hunt programs,
  127.  but if you have a copy of WORD
  128.  SAFARI and/or some others you might
  129.  want to try them out if you haven't
  130.  used them for a while; then print out
  131.  a copies of the listing.
  132.  
  133.      Next type in a copy of WORD
  134.  HUNT, try it out, and make some
  135.  comparisons.  This will give you a
  136.  good idea of how I went about the
  137.  task.
  138.  
  139.      Think about some really good
  140.  programs you recall from the past,
  141.  dig them out, look them over, see if
  142.  you can brighten them up, make them
  143.  better.  Sometimes it'll take drastic
  144.  changes.  Sometimes little.  But in
  145.  either case you've had some fun with
  146.  some programs you probably would have
  147.  left forgotten in a box in the
  148.  closet.  Now you can enjoy them all
  149.  over again.
  150.  
  151.      
  152.  
  153.      NOTE: When I first wrote the
  154.  program I was going to write it in
  155.  BASIC.  After I translated quite a
  156.  few line from my flowchart notes, I
  157.  decided to go into XB.  I continued
  158.  with the PRINT and colon lines
  159.  instead of DISPLAY AT statements
  160.  until testing.  It turned out to be
  161.  fine and fast as it was, so I left
  162.  them in.  Those of you who'd like to
  163.  tighten this even more, adding or
  164.  changing features, send me a copy.
  165.  If the improvements are really good,
  166.  I'll print an update in a future
  167.  column.  (Am also looking for
  168.  original SHORT programs in XB for
  169.  inclusion here with full credit.)
  170.  
  171.      JACK SUGHRUE, Box 459, E.Douglas
  172.  MA 01516
  173.  
  174.  
  175.      WORD HUNT 
  176.  
  177.      
  178.  
  179. .TL 126:94;
  180. .TL 123:64;
  181. .TL 125:38;
  182. .TL 124:42;
  183. .TL 92:46;
  184. .NF
  185. 100 {=1 :: CALL CLEAR :: DIM
  186.  A$(728),A(7),B$(25)
  187. 110 C$="0" :: FOR B={ TO 8 :
  188. : CALL COLOR(B,2,13)
  189. 120 NEXT B :: CALL CHAR(96,"
  190. 0"):: GOSUB 200 :: PRINT "
  191. WORD HUNT PUZZLE ": : : : :
  192. : : : : : : :: PRINT "  ~~~s
  193. trike~~~any~~~key~~~" :: GOS
  194. UB 750
  195. 130 GOSUB 200 :: PRINT " WOR
  196. D HUNT PUZZLE  ": : :: PRINT
  197.  : :" CHOOSE" :: PRINT :"
  198. 1  SETUP (CHOOSE FIRST)" ::
  199. PRINT :"   2  INPUT PUZZLE"
  200. 140 PRINT :"   3  OUTPUT LIS
  201. T"
  202. 150 PRINT :"   4  OUTPUT ANS
  203. WER" :: PRINT :"   5  QUIT":
  204.  : : : :
  205. 160 GOSUB 750 :: IF C<49 THE
  206. N 160
  207. 170 IF C>53 THEN 160
  208. 180 ON C-48 GOSUB 770,230,97
  209. 0,870,190 :: GOTO 130
  210. 190 CALL CLEAR :: STOP
  211. 200 CALL CLEAR :: CALL SCREE
  212. N(11):: CALL VCHAR({,{,96,48
  213. ):: CALL VCHAR({,31,96,48)::
  214.  FOR D={ TO 8
  215. 210 CALL SOUND(-999,VAL(SEG$
  216. ("26226229433034939244049452
  217. 3587659698784",INT(12|RND+{)
  218. |3-2,3)),0,VAL(SEG$("1311751
  219. 96",INT(3|RND+{)|3-2,3)),5)
  220. 220 NEXT D :: RETURN
  221. 230 GOSUB 200 :: PRINT " CHO
  222. OSE " :: PRINT :"   1     10
  223. X10 PUZZLE" :: PRINT :"   2
  224.     20X20 PUZZLE" :: PRINT :
  225. "   3     25X25 PUZZLE": : :
  226.  : : : : : : : : :
  227. 240 GOSUB 750 :: IF C<49 THE
  228. N 240
  229. 250 IF C>51 THEN 240
  230. 260 E=(C-48)|10-5|INT(C/51):
  231. : GOSUB 200 :: F={ :: G={ ::
  232.  H={ :: IF I=0 THEN 280
  233. 270 INPUT " TITLE OF PUZZLE?
  234.  ":D$ :: INPUT " HOW MANY CO
  235. PIES? ":F
  236. 280 INPUT " HOW MANY WORDS?
  237. ":J :: IF J<26 THEN 300
  238. 290 PRINT "SORRY: 25-WORD MA
  239. XIMUM\" :: GOTO 280
  240. 300 FOR B=0 TO J-{
  241. 310 INPUT " WORD "}STR$(B+{)
  242. }" ? ":B$(B):: IF LEN(B$(B))
  243. >2 THEN 330
  244. 320 PRINT "SORRY: 3-LETTER M
  245. INIMUM\" :: GOTO 310
  246. 330 IF LEN(B$(B))<11 THEN 35
  247. 0
  248. 340 PRINT "SORRY: 10-LETTER
  249. MAXIMUM\" :: GOTO 310
  250. 350 NEXT B
  251. 360 INPUT "ANY CHANGES? (Y/N
  252. ) ":E$ :: IF E$<>"Y" THEN 39
  253. 0
  254. 370 INPUT "WHICH NUMBER? ":B
  255. 380 INPUT "MAKE CORRECTION?"
  256. :B$(B-{):: GOTO 360
  257. 390 GOSUB 200 :: PRINT : : :
  258. "         THINKING\\\" :: A(
  259. 0)={ :: A(4)=-{ :: A({)=E+{
  260. :: A(5)=-A({):: A(2)=A({)+{
  261. :: A(6)=-A(2):: A(3)=A(2)+{
  262. :: A(7)=-A(3):: B=E+3
  263. 400 K=(E+2)~2-{-B :: FOR L=B
  264.  TO K :: A$(L)="  "
  265. 410 NEXT L :: M=E+2 :: K=M|M
  266. -M :: FOR B=0 TO K STEP M ::
  267.  A$(B)="||" :: A$(B+E+{)="||
  268. " :: A$(B/M)="||" :: A$(K+B/
  269. M)="||"
  270. 420 NEXT B :: K=0 :: FOR N=0
  271.  TO J-{ :: D=0
  272. 430 D=D+{ :: E$=STR$(D)}" "
  273. :: CALL HCHAR(23,25,ASC(E$))
  274. :: CALL HCHAR(23,26,ASC(SEG$
  275. (E$,2,{))):: IF D<76 THEN 49
  276. 0
  277. 440 J=N :: GOSUB 200 :: PRIN
  278. T "SORRY: CAN ONLY SQUEEZE I
  279. N";STR$(J);" WORDS\": : : :
  280. : :: PRINT " CHOOSE" :: PRIN
  281. T :"   1    USE ";STR$(J):"P
  282. RESENT LIST\" :: PRINT :"
  283. 2    BEGIN AGAIN": : : : : :
  284.  : : : : : :
  285. 450 GOSUB 750 :: IF C<>49 TH
  286. EN 470
  287. 460 GOSUB 200 :: PRINT "
  288.      THINKING\\\": : : : : :
  289.  : : : : : : :: GOTO 620
  290. 470 IF C=50 THEN 740
  291. 480 GOTO 450
  292. 490 B=INT(((E+2)~2-E)|RND)+E
  293.  :: IF A$(B)<>"  " THEN 430
  294. 500 FOR O=0 TO 7
  295. 510 IF K<8 THEN 530
  296. 520 K=0
  297. 530 L=B+A(K):: FOR P=2 TO LE
  298. N(B$(N)):: IF L<E+2 THEN 570
  299. 540 IF A$(L)<>"  " THEN 570
  300. 550 L=L+A(K)
  301. 560 NEXT P :: GOTO 590
  302. 570 K=K+{
  303. 580 NEXT O :: GOTO 430
  304. 590 L=B :: FOR P={ TO LEN(B$
  305. (N)):: A$(L)=SEG$(B$(N),P,{)
  306. :: A$(L)=A$(L)}A$(L):: L=L+A
  307. (K)
  308. 600 NEXT P :: K=K+{
  309. 610 NEXT N
  310. 620 FOR B=0 TO (E+2)~2-{ ::
  311. IF A$(B)<>"  " THEN 640
  312. 630 A$(B)=CHR$(INT(26|RND)+6
  313. 5)}" "
  314. 640 NEXT B :: GOSUB 200 :: I
  315. F I=0 THEN 660
  316. 650 PRINT " P R I N T I N G"
  317. 660 FOR M={ TO F :: IF I=0 T
  318. HEN 680
  319. 670 PRINT #I:CHR$(27)}CHR$(8
  320. 7)}CHR$({): : :"     ";D$:"
  321.     ~~~~~~~~~~":
  322. 680 FOR B=0 TO E+{ :: PRINT
  323. #I:CHR$(27)}CHR$(87)}CHR$({)
  324. :"   ";:: FOR K=B|(E+2)TO (B
  325. +{)|(E+2)-{ :: PRINT #I:SEG$
  326. (A$(K),{,{);
  327. 690 NEXT K
  328. 700 NEXT B
  329. 710 NEXT M :: IF I<>0 THEN 7
  330. 30
  331. 720 PRINT :"       PRESS ANY
  332.  KEY";:: GOSUB 750
  333. 730 PRINT #I:CHR$(27)}CHR$(8
  334. 7)}CHR$({): : :
  335. 740 RETURN
  336. 750 CALL KEY(0,C,Q):: IF Q<=
  337. 0 THEN 750
  338. 760 RETURN
  339. 770 GOSUB 200 :: PRINT " CHO
  340. OSE" :: PRINT :"   1   SCREE
  341. N" :: PRINT :"   2   PARALLE
  342. L PRINTER" :: PRINT :"   3
  343.  OTHER": : : : : : : : : : :
  344.  : : : : :
  345. 780 GOSUB 750 :: IF C<49 THE
  346. N 780
  347. 790 IF C>51 THEN 780
  348. 800 I=0 :: IF C=49 THEN 860
  349. 810 I={ :: F$="PIO" :: IF C=
  350. 50 THEN 830
  351. 820 INPUT " DEVICE ? ":F$
  352. 830 IF C$="0" THEN 850
  353. 840 CLOSE #{
  354. 850 OPEN #{:F$,OUTPUT :: C$=
  355. "1"
  356. 860 RETURN
  357. 870 GOSUB 200 :: IF I=0 THEN
  358.  890
  359. 880 INPUT "HOW MANY COPIES?
  360. ":G :: PRINT : : :"PRINTING
  361. ANSWERS\"
  362. 890 FOR M={ TO G :: IF I=0 T
  363. HEN 910
  364. 900 PRINT #I: : : :"     ";D
  365. $:"     ~~~~~~~~~~":
  366. 910 FOR B=0 TO E+{ :: PRINT
  367. #I: :"   ";:: FOR K=B|(E+2)T
  368. O (B+{)|(E+2)-{ :: PRINT #I:
  369. SEG$(A$(K),2,{);
  370. 920 NEXT K
  371. 930 NEXT B
  372. 940 NEXT M :: IF I<>0 THEN 9
  373. 60
  374. 950 PRINT :"       PRESS ANY
  375.  KEY";:: GOSUB 750
  376. 960 PRINT #I: : : : :: RETUR
  377. N
  378. 970 GOSUB 200 :: IF I=0 THEN
  379.  990
  380. 980 INPUT "HOW MANY COPIES?
  381. ":H :: PRINT : : :"PRINTING
  382. LIST\"
  383. 990 FOR M={ TO H :: IF I=0 T
  384. HEN 1010
  385. 1000 PRINT #I: : : :"     ";
  386. D$:"     ~~~~~~~~~~": :
  387. 1010 FOR B=0 TO J-{ :: PRINT
  388.  #I:"     ";B$(B)
  389. 1020 NEXT B :: PRINT #I: : :
  390.  :
  391. 1030 NEXT M :: IF I<>0 THEN
  392. 1050
  393. 1040 PRINT "       PRESS ANY
  394.  KEY";:: GOSUB 750
  395. 1050 RETURN
  396. .FI;AD;
  397.  
  398. ÇçǼçïÉòƒ⌐╒╒╒╒╒╒╒╒╒╒Çï
  399.