home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
CPM
/
EDUCATIN
/
SPELLBE4.LBR
/
SPELLBE4.BQS
/
SPELLBE4.BAS
Wrap
BASIC Source File
|
2000-06-30
|
4KB
|
101 lines
10 REM * * * SPELLING - BEE * * *
20 REM * ORGINAL 1979 FEB 28 BY FREDRICK GHOFULPO *
30 REM * REV (1) 1979 MAR 19 BY ALAN R. GLICKER *
40 REM * REV (2) 1979 APR 01 BY FREDRICK GHOFULPO *
50 REM * REV (3) 1986 JUN 15 BY KEITH PETERSEN *
60 REM
70 CL$=CHR$(26): REM * * * CLEAR SCREEN * * *
80 F$="SPELL.DAT"
90 PRINT CL$;
100 FOR I=1 TO 4: PRINT: NEXT I
110 PRINT "DO YOU WANT TO USE > "; F$;
120 A$="YES"
130 INPUT " < FOR YOUR DATA"; A$
140 IF LEFT$(A$,1)="Y" THEN 180
150 PRINT
160 INPUT "WHAT FILE DO YOU WISH TO USE ( NAME.DAT )"; F$
170 IF RIGHT$(F$,4)<>".DAT" THEN PRINT CL$: PRINT: PRINT:
PRINT: PRINT "WHAT ???": GOTO 160
180 PRINT CL$
190 FOR I=1 TO 4: PRINT: NEXT I
200 PRINT TAB(25); "SPELLING-BEE": PRINT
210 REM ADAPTED FROM HANGMAN
220 REM FROM CREATIVE COMPUTING MORRISTOWN, N.J.
230 PRINT TAB(15); "MODIFIED BY FREDRICK & LYNNE GHOFULPO"
240 PRINT: PRINT: PRINT
250 C=1
260 REM * REV (2) DATA FILE LENGHT COUNTER
270 OPEN "I", 1, F$
280 FOR I=1 TO 10000
290 INPUT #1, A$
300 ON ERROR GOTO 320
310 NEXT I
320 CLOSE 1
330 N=I-2
340 PRINT "THERE ARE "; N; " WORDS IN "; F$; " FILE.": PRINT
350 DIM L$(20), D$(20), N$(26), U(N)
360 FOR I=1 TO 20: D$(I)="-": NEXT I: M=0
370 FOR I=1 TO 26: N$(I)="": NEXT I
380 IF C<N THEN 410
390 PRINT"YOU DID ALL THE WORDS!!": GOTO 940
400 REM * REV (1) DISK OPERATION
410 CLOSE 1: OPEN "I", 1, F$
420 PRINT "HOLD DOWN SPACE BAR TO CHOOSE A WORD >>>"
430 IF INKEY$ <> "" THEN 460
440 W7=RND(1)
450 GOTO 430
460 INPUT #1, N
470 PRINT: PRINT "I'M THINKING OF A WORD!!!"
480 Q=INT(N*RND(1))+1
490 IF U(Q)=1 THEN 410
500 U(Q)=1: C=C+1: RESTORE: T1=0
510 FOR I=1 TO Q: INPUT #1, A$: NEXT I
520 CLOSE 1
530 L=LEN(A$): FOR I=1 TO LEN(A$): L$(I)=MID$(A$,I,1)
540 NEXT I
550 PRINT CL$: PRINT: PRINT "HERE ARE THE LETTERS YOU USED:"
560 FOR I=1 TO 26: PRINT N$(I);: IF N$(I+1)="" THEN 580
570 PRINT",";: NEXT I
580 PRINT: FOR I=1 TO L: PRINT D$(I);: NEXT I: PRINT
590 INPUT "WHAT IS YOUR GUESS"; G$: R=0
600 IF LEN(G$)>1 THEN 590
610 FOR I=1 TO 26: IF N$(I)="" THEN 640
620 IF G$=N$(I) THEN PRINT CL$: PRINT: PRINT: PRINT: PRINT:
PRINT "YOU GUESSED THAT LETTER BEFORE": PRINT: PRINT:
PRINT: PRINT: FOR I=1 TO 1500: NEXT I: GOTO 550
630 NEXT I: PRINT "PROGRAM ERROR. RUN AGAIN.": END
640 N$(I)=G$: T1=T1+1
650 FOR I=1 TO L: IF L$(I)=G$ THEN 680
660 NEXT I: IF R=0 THEN 690
670 GOTO 700
680 D$(I)=G$: R=R+1: GOTO 660
690 M=M+1: GOTO 860
700 FOR I=1 TO L: IF D$(I)="-" THEN 720
710 NEXT I: GOTO 840
720 PRINT: FOR I=1 TO L: PRINT D$(I);: NEXT I: PRINT
730 INPUT "WHAT IS YOUR GUESS FOR THE WORD"; B$
740 IF A$=B$ THEN 770
750 PRINT "WRONG. TRY ANOTHER LETTER."
760 FOR I=1 TO 1000: NEXT I: GOTO 550
770 PRINT "RIGHT!! IT TOOK YOU"; T1; "GUESS";
780 IF T1>1 THEN PRINT "ES";
790 PRINT "!"
800 INPUT "WANT ANOTHER WORD"; W$
810 IF LEFT$(W$,1)="Y" THEN PRINT CL$: GOTO 360
820 IF LEFT$(W$,1)<>"N" THEN 800
830 PRINT: PRINT "IT'S BEEN FUN! ...";: CLOSE 1: GOTO 940
840 PRINT: PRINT"YOU FOUND THE WORD "; A$; "!"
850 FOR I=1 TO 2000: NEXT I: GOTO 800
860 PRINT: PRINT "SORRY, THAT LETTER ISN'T IN THE WORD."
870 FOR I=1 TO 1000: NEXT I
880 IF M<>10 THEN 550
890 PRINT CL$: PRINT: PRINT: PRINT
900 PRINT " SORRY, YOU LOSE. THE WORD WAS"
910 PRINT: PRINT TAB(25); "' "; A$; " '"
920 PRINT: PRINT" YOU MISSED THAT ONE. DO YOU ";: GOTO 800
930 INPUT "TYPE YES OR NO"; Y$: IF LEFT$(Y$,1)="Y" THEN 360
940 PRINT "BYE NOW"
950 END
SSED THAT ONE. DO YOU ";: GOTO 800
930 INPUT "TYPE YES OR NO"; Y$: IF LEFT$(Y$,1)="Y" THEN 360
94