Compucolor.org – Virtual Media

Listing of file='ANIMAL.BAS;01' on disk='vmedia/chip_24-sector.ccvf'

5 REM  
10 REM   ***  'ANIMAL' ADAPTED BY D.B.SUITS, SEPT., 10 A.L.
12 REM   ***  FROM 'BASIC COMPUTER GAMES:
14 REM   ***  MICROCOMPUTER EDITION' (MORRISTOWN, N.J.:
16 REM   ***  CREATIVE COMPUTING PRESS, 1978), PP. 4-5
20 CLEAR 5000
25 PLOT 12,6,1,14,29
30 PRINT TAB( 25)"ANIMAL"
35 PRINT :PRINT
40 PRINT "THINK OF AN ANIMAL AND I'LL TRY TO GUESS WHAT IT IS."
50 FOR X= 1TO 2000:NEXT X:PRINT :PRINT
60 PLOT 15
70 DIM A$(200)
80 FOR I= 0TO 3
90 READ A$(I)
100 NEXT I
110 N= VAL (A$(0))
115 REM 
120 REM   ***  MAIN CONTROL SECTION
130 INPUT "ARE YOU THINKING OF AN ANIMAL? ";A$
140 IF A$= "LIST"THEN 600
150 IF LEFT$ (A$,1)< > "Y"THEN 800
160 K= 1
170 PRINT :PLOT 18:GOSUB 390
180 IF LEN (A$(K))= 0THEN 999
190 IF LEFT$ (A$(K),2)= "/Q"THEN 170
200 PRINT :PRINT "IS IT A";:GOSUB 2000
210 INPUT "? ";A$
220 A$= LEFT$ (A$,1)
230 IF A$= "N"THEN 245
233 PLOT 22:PRINT :PRINT
235 R= INT (10* RND (1))+ 1
236 ON RGOSUB 900,910,920,930,940,950,960,970,980,990
237 FOR K= 1TO 700:NEXT K:PRINT :PRINT
238 PRINT "LET'S DO IT AGAIN."
239 FOR X= 1TO 2000:NEXT X:PRINT :GOTO 120
245 PRINT :GOSUB 3000:INPUT "WHAT ANIMAL WERE YOU THINKING OF? ";V$
246 IF LEFT$ (V$,2)= "A "THEN V$= RIGHT$ (V$,LEN (V$)- 2):GOTO 250
247 IF LEFT$ (V$,3)= "AN "THEN V$= RIGHT$ (V$,LEN (V$)- 3)
250 IF ASC (RIGHT$ (V$,1))< 65THEN V$= LEFT$ (V$,LEN (V$)- 1):GOTO 250
252 PRINT
255 PRINT "PLEASE TYPE IN A QUESTION THAT WOULD DISTINGUISH A";
260 GOSUB 1000:PRINT V$:PRINT "FROM A";:GOSUB 2000
270 INPUT ": ";X$:PRINT
272 IF ASC (RIGHT$ (X$,1))< 65THEN X$= LEFT$ (X$,LEN (X$)- 1):GOTO 272
280 PRINT "IN THE CASE OF A";:GOSUB 1000:PRINT V$" THE ANSWER WOULD BE";
290 INPUT ": ";A$:FOR X= 1TO 1000:NEXT X
300 A$= LEFT$ (A$,1):IF A$< > "Y"AND A$< > "N"THEN 280
310 IF A$= "Y"THEN B$= "N"
320 IF A$= "N"THEN B$= "Y"
330 Z1= VAL (A$(0))
340 A$(0)= STR$ (Z1+ 2)
350 A$(Z1)= A$(K)
360 A$(Z1+ 1)= "/A"+ V$
370 A$(K)= "/Q"+ X$+ "/"+ A$+ STR$ (Z1+ 1)+ "/"+ B$+ STR$ (Z1)+ "/"
380 PRINT :GOTO 120
390 REM 
395 REM   ***  SUBROUTINE TO PRINT QUESTIONS
400 Q$= A$(K)
410 FOR Z= 3TO LEN (Q$)
415 IF MID$ (Q$,Z,1)< > "/"THEN PRINT MID$ (Q$,Z,1);:NEXT Z
420 INPUT "? ";C$
430 C$= LEFT$ (C$,1)
440 IF C$< > "Y"AND C$< > "N"THEN PRINT :GOTO 410
450 T$= "/"+ C$
455 FOR X= 3TO LEN (Q$)- 1
460 IF MID$ (Q$,X,2)= T$THEN 480
470 NEXT X
475 GOTO 999
480 FOR Y= X+ 1TO LEN (Q$)
490 IF MID$ (Q$,Y,1)= "/"THEN 510
500 NEXT Y
505 GOTO 999
510 K= VAL (MID$ (Q$,X+ 2,Y- X- 2))
520 RETURN
525 REM  
530 DATA "4","/QDOES IT SWIM/Y2/N3/","/ABASS","/ACROW"
550 REM  
600 PRINT
603 PRINT "ANIMALS I ALREADY KNOW ARE:"
605 X= 0
610 FOR I= 1TO 200
620 IF LEFT$ (A$(I),2)< > "/A"THEN 650
624 PRINT TAB( 12* X);
630 FOR Z= 3TO LEN (A$(I))
640 IF MID$ (A$(I),Z,1)< > "/"THEN PRINT MID$ (A$(I),Z,1);:NEXT Z
645 X= X+ 1:IF X> 5THEN X= 0:PRINT
650 NEXT I
660 PRINT
670 PRINT
680 GOTO 120
800 PRINT :INPUT "DO YOU WANT TO QUIT? ";R$
810 PRINT
820 IF LEFT$ (R$,1)= "N"THEN 130
830 GOTO 999
898 REM  
899 REM   ***  RESPONSES TO CORRECT GUESSES
900 PRINT "PRETTY GOOD FOR A COMPUTER,HUH?":RETURN
910 PRINT "I KNEW IT! I KNEW IT!":RETURN
920 PRINT "I MAY BE DUMB, BUT I'M NOT STUPID.":RETURN
930 PRINT "NOT BAD, EH?":RETURN
940 PRINT "TA DAAA!":RETURN
950 PRINT "TAKES ONE TO KNOW ONE....":RETURN
960 PRINT "I OWE IT ALL TO MY PROGRAMMER.":RETURN
970 PRINT "THAT WASN'T SO HARD.":RETURN
980 PRINT "NEAT, HUH?":RETURN
990 PRINT "SUCCESS AT LAST.":RETURN
999 LOAD "MENU":RUN
1000 Z$= LEFT$ (V$,1)
1010 IF Z$= "A"OR Z$= "E"OR Z$= "I"OR Z$= "O"OR Z$= "U"THEN PRINT "N";
1020 PRINT " ";:RETURN
2000 ZZ$= RIGHT$ (A$(K),LEN (A$(K))- 2):Z$= LEFT$ (ZZ$,1)
2010 GOSUB 1010:PRINT ZZ$;:RETURN
3000 R= INT (16* RND (1))+ 1:RESTORE 4000:FOR J= 1TO R:READ Z$:NEXT
3010 PLOT 19:PRINT Z$". ";:RETURN
4000 DATA "WELL, THEN","SHUCKS","HMMM","OH, DEAR"
4010 DATA "SHOOT","CAN'T WIN 'EM ALL","OH"
4020 DATA "BAD LUCK","OK","DARN","FOOEY","UGH"
4030 DATA "TSK. TSK","ER...","OOPS","DEAR ME"