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

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