20 PRINT TAB(31);"23 MATCHES" 30 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 40 PRINT:PRINT:PRINT 80 PRINT " THIS IS A GAME CALLED '23 MATCHES'." 90 PRINT 100 PRINT "WHEN IT IS YOUR TURN, YOU MAY TAKE ONE, TWO, OR THREE" 110 PRINT "MATCHES. THE OBJECT OF THE GAME IS NOT TO HAVE TO TAKE" 120 PRINT "THE LAST MATCH." 130 PRINT 140 PRINT "LET'S FLIP A COIN TO SEE WHO GOES FIRST." 150 PRINT "IF IT COMES UP HEADS, I WILL WIN THE TOSS." 155 PRINT 160 REM 165 N = 23 170 Q = INT(2*RND(5)) 180 IF Q = 1 THEN 210 190 PRINT "TAILS! YOU GO FIRST. " 195 PRINT 200 GOTO 300 210 PRINT "HEADS! I WIN! HA! HA!" 220 PRINT "PREPARE TO LOSE, MEATBALL-NOSE!!" 230 PRINT 250 PRINT "I TAKE 2 MATCHES" 260 N = N -2 270 PRINT "THE NUMBER OF MATCHES IS NOW" N 280 PRINT 290 PRINT "YOUR TURN -- YOU MAY TAKE 1, 2 OR 3 MATCHES." 300 PRINT "HOW MANY DO YOU WISH TO REMOVE", 310 INPUT K 320 IF K > 3 THEN 430 330 IF K <= 0 THEN 430 340 N = N - K 350 PRINT "THERE ARE NOW";N;"MATCHES REMAINING." 351 IF N = 4 THEN 381 352 IF N = 3 THEN 383 353 IF N = 2 THEN 385 360 IF N <= 1 THEN 530 370 Z = 4 - K 372 GOTO 390 380 PRINT 381 Z = 3 382 GOTO 390 383 Z = 2 384 GOTO 390 385 Z = 1 390 PRINT "MY TURN ! I REMOVE" Z "MATCHES" 400 N = N - Z 410 IF N <= 1 THEN 470 420 GOTO 270 430 PRINT "VERY FUNNY! DUMMY!" 440 PRINT "DO YOU WANT TO PLAY OR GOOF AROUND?" 450 PRINT "NOW, HOW MANY MATCHES DO YOU WANT", 460 GOTO 310 470 PRINT 480 PRINT"YOU POOR BOOB! YOU TOOK THE LAST MATCH! I GOTCHA!!" 490 PRINT "HA ! HA ! I BEAT YOU !!!" 500 PRINT 510 PRINT "GOOD BYE LOSER!" 520 GOTO 560 530 PRINT "YOU WON, FLOPPY EARS !" 540 PRINT "THINK YOU'RE PRETTY SMART !" 550 PRINT "LETS PLAY AGAIN AND I'LL BLOW YOUR SHOES OFF !!" 560 STOP 570 END 1 PRINT TAB(32);"3D PLOT" 2 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 3 PRINT:PRINT:PRINT 5 DEF FNA(Z)=30*EXP(-Z*Z/100) 100 PRINT 110 FOR X=-30 TO 30 STEP 1.5 120 L=0 130 Y1=5*INT(SQR(900-X*X)/5) 140 FOR Y=Y1 TO -Y1 STEP -5 150 Z=INT(25+FNA(SQR(X*X+Y*Y))-.7*Y) 160 IF Z<=L THEN 190 170 L=Z 180 PRINT TAB(Z);"*"; 190 NEXT Y 200 PRINT 210 NEXT X 300 END 10 PRINT TAB(26);"ACEY DUCEY CARD GAME" 20 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 21 PRINT 22 PRINT 30 PRINT"ACEY-DUCEY IS PLAYED IN THE FOLLOWING MANNER " 40 PRINT"THE DEALER (COMPUTER) DEALS TWO CARDS FACE UP" 50 PRINT"YOU HAVE AN OPTION TO BET OR NOT BET DEPENDING" 60 PRINT"ON WHETHER OR NOT YOU FEEL THE CARD WILL HAVE" 70 PRINT"A VALUE BETWEEN THE FIRST TWO." 80 PRINT"IF YOU DO NOT WANT TO BET, INPUT A 0" 100 N=100 110 Q=100 120 PRINT "YOU NOW HAVE";Q;"DOLLARS." 130 PRINT 140 GOTO 260 210 Q=Q+M 220 GOTO 120 240 Q=Q-M 250 GOTO 120 260 PRINT"HERE ARE YOUR NEXT TWO CARDS: " 270 A=INT(14*RND(1))+2 280 IF A<2 THEN 270 290 IF A>14 THEN 270 300 B=INT(14*RND(1))+2 310 IF B<2 THEN 300 320 IF B>14 THEN 300 330 IF A>=B THEN 270 350 IF A<11 THEN 400 360 IF A=11 THEN 420 370 IF A=12 THEN 440 380 IF A=13 THEN 460 390 IF A=14 THEN 480 400 PRINT A 410 GOTO 500 420 PRINT"JACK" 430 GOTO 500 440 PRINT"QUEEN" 450 GOTO 500 460 PRINT"KING" 470 GOTO 500 480 PRINT"ACE" 500 IF B<11 THEN 550 510 IF B=11 THEN 570 520 IF B=12 THEN 590 530 IF B=13 THEN 610 540 IF B=14 THEN 630 550 PRINT B 560 GOTO 650 570 PRINT"JACK" 580 GOTO 650 590 PRINT"QUEEN" 600 GOTO 650 610 PRINT"KING" 620 GOTO 650 630 PRINT"ACE" 640 PRINT 650 PRINT 660 INPUT"WHAT IS YOUR BET";M 670 IF M<>0 THEN 680 675 PRINT"CHICKEN!!" 676 PRINT 677 GOTO 260 680 IF M<=Q THEN 730 690 PRINT"SORRY, MY FRIEND, BUT YOU BET TOO MUCH." 700 PRINT"YOU HAVE ONLY ";Q;" DOLLARS TO BET." 710 GOTO 650 730 C=INT(14*RND(1))+2 740 IF C<2 THEN 730 750 IF C>14 THEN 730 760 IF C<11 THEN 810 770 IF C=11 THEN 830 780 IF C=12 THEN 850 790 IF C=13 THEN 870 800 IF C=14 THEN 890 810 PRINT C 820 GOTO 910 830 PRINT"JACK" 840 GOTO 910 850 PRINT"QUEEN" 860 GOTO 910 870 PRINT"KING" 880 GOTO 910 890 PRINT "ACE" 900 PRINT 910 IF C>A THEN 930 920 GOTO 970 930 IF C>=B THEN 970 950 PRINT"YOU WIN!!!" 960 GOTO 210 970 PRINT"SORRY, YOU LOSE" 980 IF M<Q THEN 240 990 PRINT 1000 PRINT 1010 PRINT"SORRY, FRIEND, BUT YOU BLEW YOUR WAD." 1015 PRINT:PRINT 1020 INPUT"TRY AGAIN (YES OR NO)";A$ 1025 PRINT:PRINT 1030 IF A$="YES" THEN 110 1040 PRINT"O.K., HOPE YOU HAD FUN!" 1050 END 10 PRINT TAB(28);"AMAZING PROGRAM" 20 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 30 PRINT:PRINT:PRINT:PRINT 100 INPUT "WHAT ARE YOUR WIDTH AND LENGTH";H,V 102 IF H<>1 AND V<>1 THEN 110 104 PRINT "MEANINGLESS DIMENSIONS. TRY AGAIN.":GOTO 100 110 DIM W(H,V),V(H,V) 120 PRINT 130 PRINT 140 PRINT 150 PRINT 160 Q=0:Z=0:X=INT(RND(1)*H+1) 165 FOR I=1 TO H 170 IF I=X THEN 173 171 PRINT ".--";:GOTO 180 173 PRINT ". "; 180 NEXT I 190 PRINT "." 195 C=1:W(X,1)=C:C=C+1 200 R=X:S=1:GOTO 260 210 IF R<>H THEN 240 215 IF S<>V THEN 230 220 R=1:S=1:GOTO 250 230 R=1:S=S+1:GOTO 250 240 R=R+1 250 IF W(R,S)=0 THEN 210 260 IF R-1=0 THEN 530 265 IF W(R-1,S)<>0 THEN 530 270 IF S-1=0 THEN 390 280 IF W(R,S-1)<>0 THEN 390 290 IF R=H THEN 330 300 IF W(R+1,S)<>0 THEN 330 310 X=INT(RND(1)*3+1) 320 ON X GOTO 790,820,860 330 IF S<>V THEN 340 334 IF Z=1 THEN 370 338 Q=1:GOTO 350 340 IF W(R,S+1)<>0 THEN 370 350 X=INT(RND(1)*3+1) 360 ON X GOTO 790,820,910 370 X=INT(RND(1)*2+1) 380 ON X GOTO 790,820 390 IF R=H THEN 470 400 IF W(R+1,S)<>0 THEN 470 405 IF S<>V THEN 420 410 IF Z=1 THEN 450 415 Q=1:GOTO 430 420 IF W(R,S+1)<>0 THEN 450 430 X=INT(RND(1)*3+1) 440 ON X GOTO 790,860,910 450 X=INT(RND(1)*2+1) 460 ON X GOTO 790,860 470 IF S<>V THEN 490 480 IF Z=1 THEN 520 485 Q=1:GOTO 500 490 IF W(R,S+1)<>0 THEN 520 500 X=INT(RND(1)*2+1) 510 ON X GOTO 790,910 520 GOTO 790 530 IF S-1=0 THEN 670 540 IF W(R,S-1)<>0 THEN 670 545 IF R=H THEN 610 547 IF W(R+1,S)<>0 THEN 610 550 IF S<>V THEN 560 552 IF Z=1 THEN 590 554 Q=1:GOTO 570 560 IF W(R,S+1)<>0 THEN 590 570 X=INT(RND(1)*3+1) 580 ON X GOTO 820,860,910 590 X=INT(RND(1)*2+1) 600 ON X GOTO 820,860 610 IF S<>V THEN 630 620 IF Z=1 THEN 660 625 Q=1:GOTO 640 630 IF W(R,S+1)<>0 THEN 660 640 X=INT(RND(1)*2+1) 650 ON X GOTO 820,910 660 GOTO 820 670 IF R=H THEN 740 680 IF W(R+1,S)<>0 THEN 740 685 IF S<>V THEN 700 690 IF Z=1 THEN 730 695 Q=1:GOTO 830 700 IF W(R,S+1)<>0 THEN 730 710 X=INT(RND(1)*2+1) 720 ON X GOTO 860,910 730 GOTO 860 740 IF S<>V THEN 760 750 IF Z=1 THEN 780 755 Q=1:GOTO 770 760 IF W(R,S+1)<>0 THEN 780 770 GOTO 910 780 GOTO 1000 790 W(R-1,S)=C 800 C=C+1:V(R-1,S)=2:R=R-1 810 IF C=H*V+1 THEN 1010 815 Q=0:GOTO 260 820 W(R,S-1)=C 830 C=C+1 840 V(R,S-1)=1:S=S-1:IF C=H*V+1 THEN 1010 850 Q=0:GOTO 260 860 W(R+1,S)=C 870 C=C+1:IF V(R,S)=0 THEN 880 875 V(R,S)=3:GOTO 890 880 V(R,S)=2 890 R=R+1 900 IF C=H*V+1 THEN 1010 905 GOTO 530 910 IF Q=1 THEN 960 920 W(R,S+1)=C:C=C+1:IF V(R,S)=0 THEN 940 930 V(R,S)=3:GOTO 950 940 V(R,S)=1 950 S=S+1:IF C=H*V+1 THEN 1010 955 GOTO 260 960 Z=1 970 IF V(R,S)=0 THEN 980 975 V(R,S)=3:Q=0:GOTO 1000 980 V(R,S)=1:Q=0:R=1:S=1:GOTO 250 1000 GOTO 210 1010 FOR J=1 TO V 1011 PRINT "I"; 1012 FOR I=1 TO H 1013 IF V(I,J)<2 THEN 1030 1020 PRINT " "; 1021 GOTO 1040 1030 PRINT " I"; 1040 NEXT I 1041 PRINT 1043 FOR I=1 TO H 1045 IF V(I,J)=0 THEN 1060 1050 IF V(I,J)=2 THEN 1060 1051 PRINT ": "; 1052 GOTO 1070 1060 PRINT ":--"; 1070 NEXT I 1071 PRINT "." 1072 NEXT J 1073 END 10 PRINT TAB(32);"ANIMAL" 20 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 30 PRINT: PRINT: PRINT 40 PRINT "PLAY 'GUESS THE ANIMAL'" 45 PRINT 50 PRINT "THINK OF AN ANIMAL AND THE COMPUTER WILL TRY TO GUESS IT." 60 PRINT 70 DIM A$(200) 80 FOR I=0 TO 3 90 READ A$(I) 100 NEXT I 110 N=VAL(A$(0)) 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 120 160 K=1 170 GOSUB 390 180 IF LEN(A$(K))=0 THEN 999 190 IF LEFT$(A$(K),2)="\Q" THEN 170 200 PRINT "IS IT A ";RIGHT$(A$(K),LEN(A$(K))-2); 210 INPUT A$ 220 A$=LEFT$(A$,1) 230 IF LEFT$(A$,1)="Y" THEN PRINT "WHY NOT TRY ANOTHER ANIMAL?": GOTO 120 240 INPUT "THE ANIMAL YOU WERE THINKING OF WAS A ";V$ 250 PRINT "PLEASE TYPE IN A QUESTION THAT WOULD DISTINGUISH A" 260 PRINT V$;" FROM A ";RIGHT$(A$(K),LEN(A$(K))-2) 270 INPUT X$ 280 PRINT "FOR A ";V$;" THE ANSWER WOULD BE "; 290 INPUT A$ 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 GOTO 120 390 REM SUBROUTINE TO PRINT QUESTIONS 400 Q$=A$(K) 410 FOR Z=3 TO 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 410 450 T$="\"+C$ 455 FOR X=3 TO LEN(Q$)-1 460 IF MID$(Q$,X,2)=T$ THEN 480 470 NEXT X 475 STOP 480 FOR Y=X+1 TO LEN(Q$) 490 IF MID$(Q$,Y,1)="\" THEN 510 500 NEXT Y 505 STOP 510 K=VAL(MID$(Q$,X+2,Y-X-2)) 520 RETURN 530 DATA "4","\QDOES IT SWIM\Y2\N3\","\AFISH","\ABIRD" 600 PRINT:PRINT "ANIMALS I ALREADY KNOW ARE:" 605 X=0 610 FOR I=1 TO 200 620 IF LEFT$(A$(I),2)<>"\A" THEN 650 624 PRINT TAB(15*X); 630 FOR Z=3 TO 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=4 THEN X=0: PRINT 650 NEXT I 660 PRINT 670 PRINT 680 GOTO 120 999 END 5 PRINT TAB(34);"AWARI" 7 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 10 DATA 0 15 DIM B(13),G(13),F(50):READ N 20 PRINT:PRINT:E=0 25 FOR I=0 TO 12:B(I)=3:NEXT I 30 C=0:F(N)=0:B(13)=0:B(6)=0 35 GOSUB 500 40 PRINT "YOUR MOVE";:GOSUB 110 45 IF E=0 THEN 80 50 IF M=H THEN GOSUB 100 55 IF E=0 THEN 80 60 PRINT "MY MOVE IS ";:GOSUB 800 65 IF E=0 THEN 80 70 IF M=H THEN PRINT ",";:GOSUB 800 75 IF E>0 THEN 35 80 PRINT:PRINT"GAME OVER" 85 D=B(6)-B(13):IF D<0 THEN PRINT "I WIN BY";-D;"POINTS":GOTO 20 90 N=N+1:IF D=0 THEN PRINT "DRAWN GAME":GOTO 20 95 PRINT "YOU WIN BY";D;"POINTS":GOTO 20 100 PRINT "AGAIN"; 110 INPUT M:IF M<7 THEN IF M>0 THEN M=M-1:GOTO 130 120 PRINT "ILLEGAL MOVE":GOTO 100 130 IF B(M)=0 THEN 120 140 H=6:GOSUB 200 150 GOTO 500 200 K=M:GOSUB 600 205 E=0:IF K>6 THEN K=K-7 210 C=C+1:IF C<9 THEN F(N)=F(N)*6+K 215 FOR I=0 TO 5:IF B(I)<>0 THEN 230 220 NEXT I 225 RETURN 230 FOR I=7 TO 12:IF B(I)<>0 THEN E=1:RETURN 235 GOTO 220 500 PRINT:PRINT" "; 505 FOR I=12 TO 7 STEP -1:GOSUB 580 510 NEXT I 515 PRINT:I=13:GOSUB 580 520 PRINT " ";:PRINT B(6):PRINT " "; 525 FOR I=0 TO 5:GOSUB 580 530 NEXT I 535 PRINT:PRINT:RETURN 580 IF B(I)<10 THEN PRINT " "; 585 PRINT B(I);:RETURN 600 P=B(M):B(M)=0 605 FOR P=P TO 1 STEP -1:M=M+1:IF M>13 THEN M=M-14 610 B(M)=B(M)+1:NEXT P 615 IF B(M)=1 THEN IF M<>6 THEN IF M<>13 THEN IF B(12-M)<>0 THEN 625 620 RETURN 625 B(H)=B(H)+B(12-M)+1:B(M)=0:B(12-M)=0:RETURN 800 D=-99:H=13 805 FOR I=0 TO 13:G(I)=B(I):NEXT I 810 FOR J=7 TO 12:IF B(J)=0 THEN 885 815 G=0:M=J:GOSUB 600 820 FOR I=0 TO 5:IF B(I)=0 THEN 845 825 L=B(I)+I:R=0 830 IF L>13 THEN L=L-14:R=1:GOTO 830 835 IF B(L)=0 THEN IF L<>6 THEN IF L<>13 THEN R=B(12-L)+R 840 IF R>Q THEN Q=R 845 NEXT I 850 Q=B(13)-B(6)-Q:IF C>8 THEN 875 855 K=J:IF K>6 THEN K=K-7 860 FOR I=0 TO N-1:IF F(N)*6+K=INT(F(I)/6^(7-C)+.1) THEN Q=Q-2 870 NEXT I 875 FOR I=0 TO 13:B(I)=G(I):NEXT I 880 IF Q>=D THEN A=J:D=Q 885 NEXT J 890 M=A:PRINT CHR$(42+M);:GOTO 200 900 FOR I=0 TO N-1:PRINT B(I):NEXT I 999 END 5 PRINT TAB(33);"BAGELS" 10 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY":PRINT:PRINT 15 REM *** BAGLES NUMBER GUESSING GAME 20 REM *** ORIGINAL SOURCE UNKNOWN BUT SUSPECTED TO BE 25 REM *** LAWRENCE HALL OF SCIENCE, U.C. BERKELY 30 DIM A1(6),A(3),B(3) 40 Y=0:T=255 50 PRINT:PRINT:PRINT 70 INPUT "WOULD YOU LIKE THE RULES (YES OR NO)";A$ 90 IF LEFT$(A$,1)="N" THEN 150 100 PRINT:PRINT "I AM THINKING OF A THREE-DIGIT NUMBER. TRY TO GUESS" 110 PRINT "MY NUMBER AND I WILL GIVE YOU CLUES AS FOLLOWS:" 120 PRINT " PICO - ONE DIGIT CORRECT BUT IN THE WRONG POSITION" 130 PRINT " FERMI - ONE DIGIT CORRECT AND IN THE RIGHT POSITION" 140 PRINT " BAGELS - NO DIGITS CORRECT" 150 FOR I=1 TO 3 160 A(I)=INT(10*RND(1)) 165 IF I-1=0 THEN 200 170 FOR J=1 TO I-1 180 IF A(I)=A(J) THEN 160 190 NEXT J 200 NEXT I 210 PRINT:PRINT "O.K. I HAVE A NUMBER IN MIND." 220 FOR I=1 TO 20 230 PRINT "GUESS #";I, 240 INPUT A$ 245 IF LEN(A$)<>3 THEN 630 250 FOR Z=1 TO 3:A1(Z)=ASC(MID$(A$,Z,1)):NEXT Z 260 FOR J=1 TO 3 270 IF A1(J)<48 THEN 300 280 IF A1(J)>57 THEN 300 285 B(J)=A1(J)-48 290 NEXT J 295 GOTO 320 300 PRINT "WHAT?" 310 GOTO 230 320 IF B(1)=B(2) THEN 650 330 IF B(2)=B(3) THEN 650 340 IF B(3)=B(1) THEN 650 350 C=0:D=0 360 FOR J=1 TO 2 370 IF A(J)<>B(J+1) THEN 390 380 C=C+1 390 IF A(J+1)<>B(J) THEN 410 400 C=C+1 410 NEXT J 420 IF A(1)<>B(3) THEN 440 430 C=C+1 440 IF A(3)<>B(1) THEN 460 450 C=C+1 460 FOR J=1 TO 3 470 IF A(J)<>B(J) THEN 490 480 D=D+1 490 NEXT J 500 IF D=3 THEN 680 505 IF C=0 THEN 545 520 FOR J=1 TO C 530 PRINT "PICO "; 540 NEXT J 545 IF D=0 THEN 580 550 FOR J=1 TO D 560 PRINT "FERMI "; 570 NEXT J 580 IF C+D<>0 THEN 600 590 PRINT "BAGELS"; 600 PRINT 605 NEXT I 610 PRINT "OH WELL." 615 PRINT "THAT'S TWNETY GUESSES. MY NUMBER WAS";100*A(1)+10*A(2)+A(3) 620 GOTO 700 630 PRINT "TRY GUESSING A THREE-DIGIT NUMBER.":GOTO 230 650 PRINT "OH, I FORGOT TO TELL YOU THAT THE NUMBER I HAVE IN MIND" 660 PRINT "HAS NO TWO DIGITS THE SAME.":GOTO 230 680 PRINT "YOU GOT IT!!!":PRINT 690 Y=Y+1 700 INPUT "PLAY AGAIN (YES OR NO)";A$ 720 IF LEFT$(A$,1)="YES" THEN 150 730 IF Y=0 THEN 750 740 PRINT:PRINT "A";Y;"POINT BAGELS BUFF!!" 750 PRINT "HOPE YOU HAD FUN. BYE." 999 END 10 INPUT "HORIZONTAL";X 20 INPUT "VERTICAL";Y 21 INPUT "CENTERED";L$ 22 G1=0:IF L$>"P" THEN G1=1 23 INPUT "CHARACTER (TYPE 'ALL' IF YOU WANT CHARACTER BEING PRINTED)";M$ 29 PRINT "STATEMENT"; 30 INPUT A$ 35 INPUT "SET PAGE";O$ 40 A=ASC(LEFT$(A$,1)) 50 REM 60 REM 70 FOR T=1 TO LEN(A$) 80 P$=MID$(A$,T,1) 90 FOR O=1 TO 50 95 READ S$,S(1),S(2),S(3),S(4),S(5),S(6),S(7) 96 IF P$=" " THEN 812 100 IF P$=S$ THEN 200 120 NEXT O 200 RESTORE 201 X$=M$ 202 IF M$="ALL" THEN X$=S$ 205 FOR U=1 TO 7 210 FOR K=8 TO 0 STEP -1 230 IF 2^K<S(U) THEN 270 240 J(9-K)=0 250 GOTO 280 270 J(9-K)=1: S(U)=S(U)-2^K 272 IF S(U)=1 THEN 815 280 NEXT K 445 FOR T1=1 TO X 447 PRINT TAB((63-4.5*Y)*G1/(LEN(X$))+1); 450 FOR B=1 TO F(U) 460 IF J(B)=0 THEN 500 465 FOR I=1 TO Y: PRINT X$;: NEXT I 470 GOTO 600 500 FOR I=1 TO Y 510 FOR I1=1 TO LEN(X$) 520 PRINT " ";: NEXT I1 530 NEXT I 600 NEXT B 620 PRINT 630 NEXT T1 700 NEXT U 750 FOR H=1 TO 2*X: PRINT: NEXT H 800 NEXT T 806 FOR H=1 TO 75: PRINT: NEXT H 810 END 812 FOR H=1 TO 7*X: PRINT: NEXT H 813 GOTO 800 815 F(U)=9-K: GOTO 445 899 DATA " ",0,0,0,0,0,0,0 900 DATA "A",505,37,35,34,35,37,505 901 DATA "G",125,131,258,258,290,163,101 902 DATA "E",512,274,274,274,274,258,258 903 DATA "T",2,2,2,512,2,2,2 904 DATA "W",256,257,129,65,129,257,256 905 DATA "L",512,257,257,257,257,257,257 906 DATA "S",69,139,274,274,274,163,69 907 DATA "O",125,131,258,258,258,131,125 908 DATA "N",512,7,9,17,33,193,512 909 DATA "F",512,18,18,18,18,2,2 910 DATA "K",512,17,17,41,69,131,258 911 DATA "B",512,274,274,274,274,274,239 912 DATA "D",512,258,258,258,258,131,125 913 DATA "H",512,17,17,17,17,17,512 914 DATA "M",512,7,13,25,13,7,512 915 DATA "?",5,3,2,354,18,11,5 916 DATA "U",128,129,257,257,257,129,128 917 DATA "R",512,18,18,50,82,146,271 918 DATA "P",512,18,18,18,18,18,15 919 DATA "Q",125,131,258,258,322,131,381 920 DATA "Y",8,9,17,481,17,9,8 921 DATA "V",64,65,129,257,129,65,64 922 DATA "X",388,69,41,17,41,69,388 923 DATA "Z",386,322,290,274,266,262,260 924 DATA "I",258,258,258,512,258,258,258 925 DATA "C",125,131,258,258,258,131,69 926 DATA "J",65,129,257,257,257,129,128 927 DATA "1",0,0,261,259,512,257,257 928 DATA "2",261,387,322,290,274,267,261 929 DATA "*",69,41,17,512,17,41,69 930 DATA "3",66,130,258,274,266,150,100 931 DATA "4",33,49,41,37,35,512,33 932 DATA "5",160,274,274,274,274,274,226 933 DATA "6",194,291,293,297,305,289,193 934 DATA "7",258,130,66,34,18,10,8 935 DATA "8",69,171,274,274,274,171,69 936 DATA "9",263,138,74,42,26,10,7 937 DATA "=",41,41,41,41,41,41,41 938 DATA "!",1,1,1,384,1,1,1 939 DATA "0",57,69,131,258,131,69,57 940 DATA ".",1,1,129,449,129,1,1 1000 STOP 1002 END 5 PRINT TAB(31);"BASKETBALL" 7 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 8 PRINT:PRINT:PRINT 10 PRINT "THIS IS DARTMOUTH COLLEGE BASKETBALL. YOU WILL BE DARTMOUTH" 20 PRINT " CAPTAIN AND PLAYMAKER. CALL SHOTS AS FOLLOWS: 1. LONG" 30 PRINT " (30 FT.) JUMP SHOT; 2. SHORT (15 FT.) JUMP SHOT; 3. LAY" 40 PRINT " UP; 4. SET SHOT." 60 PRINT "BOTH TEAMS WILL USE THE SAME DEFENSE. CALL DEFENSE AS" 70 PRINT "FOLLOWS: 6. PRESS; 6.5 MAN-TO MAN; 7. ZONE; 7.5 NONE." 72 PRINT "TO CHANGE DEFENSE, JUST TYPE 0 AS YOUR NEXT SHOT." 76 INPUT "YOUR STARTING DEFENSE WILL BE";D:IF D<6 THEN 2010 79 PRINT 80 INPUT "CHOOSE YOUR OPPONENT";O$ 370 PRINT "CENTER JUMP" 390 IF RND(1)> 3/5 THEN 420 400 PRINT O$;" CONTROLS THE TAP." 410 GOTO 3000 420 PRINT "DARTMOUTH CONTROLS THE TAP." 425 PRINT 430 INPUT "YOUR SHOT";Z 440 P=0 445 IF Z<>INT(Z) THEN 455 446 IF Z<0 OR Z>4 THEN 455 447 GOTO 460 455 PRINT "INCORRECT ANSWER. RETYPE IT. ";:GOTO 430 460 IF RND(1)<.5 THEN 1000 480 IF T<100 THEN 1000 490 PRINT 491 IF S(1)<>S(0) THEN 510 492 PRINT:PRINT " ***** END OF SECOND HALF *****":PRINT 493 PRINT "SCORE AT END OF REGULATION TIME:" 494 PRINT " DARTMOUTH:";S(1);" ";O$;":";S(0) 495 PRINT 496 PRINT "BEGIN TWO MINUTE OVERTIME PERIOD" 499 T=93 500 GOTO 370 510 PRINT " ***** END OF GAME *****" 515 PRINT "FINAL SCORE: DARTMOUTH:";S(1);" ";O$;":";S(0) 520 STOP 600 PRINT 610 PRINT " *** TWO MINUTES LEFT IN THE GAME ***" 620 PRINT 630 RETURN 1000 ON Z GOTO 1040,1040 1030 GOTO 1300 1040 T=T+1 1041 IF T=50 THEN 8000 1042 IF T=92 THEN 1046 1043 GOTO 1050 1046 GOSUB 600 1050 PRINT "JUMP SHOT" 1060 IF RND(1)>.341*D/8 THEN 1090 1070 PRINT "SHOT IS GOOD." 1075 GOSUB 7000 1085 GOTO 3000 1090 IF RND(1)>.682*D/8 THEN 1200 1100 PRINT "SHOT IS OFF TARGET." 1105 IF D/6*RND(1)>.45 THEN 1130 1110 PRINT "DARTMOUTH CONTROLS THE REBOUND." 1120 GOTO 1145 1130 PRINT "REBOUND TO ";O$ 1140 GOTO 3000 1145 IF RND(1)>.4 THEN 1158 1150 GOTO 1300 1158 IF D=6 THEN 5100 1160 PRINT "BALL PASSED BACK TO YOU. "; 1170 GOTO 430 1180 IF RND(1)>.9 THEN 1190 1185 PRINT "PLAYER FOULED, TWO SHOTS." 1187 GOSUB 4000 1188 GOTO 3000 1190 PRINT "BALL STOLEN. ";O$;"'S BALL." 1195 GOTO 3000 1200 IF RND(1)>.782*D/8 THEN 1250 1210 PRINT "SHOT IS BLOCKED. BALL CONTROLLED BY "; 1230 IF RND(1)>.5 THEN 1242 1235 PRINT "DARTMOUTH." 1240 GOTO 430 1242 PRINT O$;"." 1245 GOTO 3000 1250 IF RND(1)>.843*D/8 THEN 1270 1255 PRINT "SHOOTER IS FOULED. TWO SHOTS." 1260 GOSUB 4000 1265 GOTO 3000 1270 PRINT "CHARGING FOUL. DARTMOUTH LOSES BALL." 1280 GOTO 3000 1300 T=T+1 1301 IF T=50 THEN 8000 1302 IF T=92 THEN 1304 1303 GOTO 1305 1304 GOSUB 600 1305 IF Z=0 THEN 2010 1310 IF Z>3 THEN 1700 1320 PRINT "LAY UP." 1330 IF 7/D*RND(1)>.4 THEN 1360 1340 PRINT "SHOT IS GOOD. TWO POINTS." 1345 GOSUB 7000 1355 GOTO 3000 1360 IF 7/D*RND(1)>.7 THEN 1500 1370 PRINT "SHOT IS OFF THE RIM." 1380 IF RND(1)>2/3 THEN 1415 1390 PRINT O$;" CONTROLS THE REBOUND." 1400 GOTO 3000 1415 PRINT "DARTMOUTH CONTROLS THE REBOUND." 1420 IF RND(1)>.4 THEN 1440 1430 GOTO 1300 1440 PRINT "BALL PASSED BACK TO YOU."; 1450 GOTO 430 1500 IF 7/D*RND(1)>.875 THEN 1600 1510 PRINT "SHOOTER FOULED. TWO SHOTS." 1520 GOSUB 4000 1530 GOTO 3000 1600 IF 7/D*RND(1)>.925 THEN 1630 1610 PRINT "SHOT BLOCKED. ";O$;"'S BALL." 1620 GOTO 3000 1630 PRINT "CHARGING FOUL. DARTMOUTH LOSES THE BALL." 1640 GOTO 3000 1700 PRINT "SET SHOT." 1710 GOTO 1330 2010 INPUT "YOUR NEW DEFENSIVE ALLIGNMENT IS";D 2030 IF D<6 THEN 2010 2040 GOTO 425 3000 P=1 3005 T=T+1 3008 IF T=50 THEN 8000 3012 GOTO 3018 3015 GOSUB 600 3018 PRINT 3020 Z1=10/4*RND(1)+1 3030 IF Z1>2 THEN 3500 3040 PRINT "JUMP SHOT." 3050 IF 8/D*RND(1)>.35 THEN 3100 3060 PRINT "SHOT IS GOOD." 3080 GOSUB 6000 3090 GOTO 425 3100 IF 8/D*RND(1)>.75 THEN 3200 3105 PRINT "SHOT IS OFF RIM." 3110 IF D/6*RND(1)>.5 THEN 3150 3120 PRINT "DARTMOUTH CONTROLS THE REBOUND." 3130 GOTO 425 3150 PRINT O$;" CONTROLS THE REBOUND." 3160 IF D=6 THEN 5000 3165 IF RND(1)>.5 THEN 3175 3168 PRINT "PASS BACK TO ";O$;" GUARD." 3170 GOTO 3000 3175 GOTO 3500 3200 IF 8/D*RND(1)>.9 THEN 3310 3210 PRINT "PLAYER FOULED. TWO SHOTS." 3220 GOSUB 4000 3230 GOTO 425 3310 PRINT "OFFENSIVE FOUL. DARTMOUTH'S BALL." 3320 GOTO 425 3500 IF Z1>3 THEN 3800 3510 PRINT "LAY UP." 3520 IF 7/D*RND(1)>.413 THEN 3600 3530 PRINT "SHOT IS GOOD." 3540 GOSUB 6000 3550 GOTO 425 3600 PRINT "SHOT IS MISSED." 3610 GOTO 3110 3800 PRINT "SET SHOT." 3810 GOTO 3520 4000 REM FOUL SHOOTING 4010 IF RND(1)>.49 THEN 4050 4020 PRINT "SHOOTER MAKES BOTH SHOTS." 4030 S(1-P)=S(1-P)+2 4040 GOSUB 6010 4041 RETURN 4050 IF RND(1)>.75 THEN 4100 4060 PRINT "SHOOTER MAKES ONE SHOT AND MISSES ONE." 4070 S(1-P)=S(1-P)+1 4080 GOTO 4040 4100 PRINT "BOTH SHOTS MISSED." 4110 GOTO 4040 5000 IF RND(1)>.75 THEN 5010 5005 GOTO 3165 5010 PRINT "BALL STOLEN. EASY LAY UP FOR DARTMOUTH." 5015 GOSUB 7000 5030 GOTO 3000 5100 IF RND(1)>.6 THEN 5120 5110 GOTO 1160 5120 PRINT "PASS STOLEN BY ";O$;" EASY LAYUP." 5130 GOSUB 6000 5140 GOTO 425 6000 S(0)=S(0)+2 6010 PRINT "SCORE: ";S(1);"TO";S(0) 6020 RETURN 7000 S(1)=S(1)+2 7010 GOSUB 6010 7020 RETURN 8000 PRINT:PRINT " ***** END OF FIRST HALF *****":PRINT 8010 PRINT "SCORE: DARTMOUTH:";S(1);" ";O$;":";S(0) 8015 PRINT 8016 PRINT 8020 GOTO 370 9999 END 10 PRINT TAB(33);"BATNUM" 20 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 30 PRINT:PRINT:PRINT 110 PRINT "THIS PROGRAM IS A 'BATTLE OF NUMBERS' GAME, WHERE THE" 120 PRINT "COMPUTER IS YOUR OPPONENT." 130 PRINT 140 PRINT "THE GAME STARTS WITH AN ASSUMED PILE OF OBJECTS. YOU" 150 PRINT "AND YOUR OPPONENT ALTERNATELY REMOVE OBJECTS FROM THE PILE." 160 PRINT "WINNING IS DEFINED IN ADVANCE AS TAKING THE LAST OBJECT OR" 170 PRINT "NOT. YOU CAN ALSO SPECIFY SOME OTHER BEGINNING CONDITIONS." 180 PRINT "DON'T USE ZERO, HOWEVER, IN PLAYING THE GAME." 190 PRINT "ENTER A NEGATIVE NUMBER FOR NEW PILE SIZE TO STOP PLAYING." 200 PRINT 210 GOTO 330 220 FOR I=1 TO 10 230 PRINT 240 NEXT I 330 INPUT "ENTER PILE SIZE";N 350 IF N>=1 THEN 370 360 GOTO 330 370 IF N<>INT(N) THEN 220 380 IF N<1 THEN 220 390 INPUT "ENTER WIN OPTION - 1 TO TAKE LAST, 2 TO AVOID LAST: ";M 410 IF M=1 THEN 430 420 IF M<>2 THEN 390 430 INPUT "ENTER MIN AND MAX ";A,B 450 IF A>B THEN 430 460 IF A<1 THEN 430 470 IF A<>INT(A) THEN 430 480 IF B<>INT(B) THEN 430 490 INPUT "ENTER START OPTION - 1 COMPUTER FIRST, 2 YOU FIRST ";S 500 PRINT:PRINT 510 IF S=1 THEN 530 520 IF S<>2 THEN 490 530 C=A+B 540 IF S=2 THEN 570 550 GOSUB 600 560 IF W=1 THEN 220 570 GOSUB 810 580 IF W=1 THEN 220 590 GOTO 550 600 Q=N 610 IF M=1 THEN 630 620 Q=Q-1 630 IF M=1 THEN 680 640 IF N>A THEN 720 650 W=1 660 PRINT "COMPUTER TAKES";N;"AND LOSES." 670 RETURN 680 IF N>B THEN 720 690 W=1 700 PRINT "COMPUTER TAKES";N;"AND WINS." 710 RETURN 720 P=Q-C*INT(Q/C) 730 IF P>=A THEN 750 740 P=A 750 IF P<=B THEN 770 760 P=B 770 N=N-P 780 PRINT "COMPUTER TAKES";P;"AND LEAVES";N 790 W=0 800 RETURN 810 PRINT:PRINT "YOUR MOVE "; 820 INPUT P 830 IF P<>0 THEN 870 840 PRINT "I TOLD YOU NOT TO USE ZERO! COMPUTER WINS BY FORFEIT." 850 W=1 860 RETURN 870 IF P<>INT(P) THEN 920 880 IF P>=A THEN 910 890 IF P=N THEN 960 900 GOTO 920 910 IF P<=B THEN 940 920 PRINT "ILLEGAL MOVE, REENTER IT "; 930 GOTO 820 940 N=N-P 950 IF N<>0 THEN 1030 960 IF M=1 THEN 1000 970 PRINT "TOUGH LUCK, YOU LOSE." 980 W=1 990 RETURN 1000 PRINT "CONGRATULATIONS, YOU WIN." 1010 W=1 1020 RETURN 1030 IF N>=0 THEN 1060 1040 N=N+P 1050 GOTO 920 1060 W=0 1070 RETURN 1080 END 5 PRINT TAB(33);"BATTLE" 7 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 10 REM -- BATTLE WRITTEN BY RAY WESTERGARD 10/70 20 REM COPYRIGHT 1971 BY THE REGENTS OF THE UNIV. OF CALIF. 30 REM PRODUCED AT THE LAWRENCE HALL OF SCIENCE, BERKELEY 40 DIM F(6,6),H(6,6),A(4),B(4),C(6),L(3) 50 FOR X=1 TO 6 51 FOR Y=1 TO 6 52 F(X,Y)=0 53 NEXT Y 54 NEXT X 60 FOR I=1 TO 3 70 N=4-I 80 FOR J=1 TO 2 90 A=INT(6*RND(1)+1) 100 B=INT(6*RND(1)+1) 110 D=INT(4*RND(1)+1) 120 IF F(A,B)>0 THEN 90 130 M=0 140 ON D GOTO 150,340,550,740 150 B(1)=B 160 B(2)=7:B(3)=7 170 FOR K=1 TO N 180 IF M>1 THEN 240 190 IF B(K)=6 THEN 230 200 IF F(A,B(K)+1)>0 THEN 230 210 B(K+1)=B(K)+1 220 GOTO 280 230 M=2 240 IF B(1)<B(2) AND B(1)<B(3) THEN Z=B(1) 242 IF B(2)<B(1) AND B(2)<B(3) THEN Z=B(2) 244 IF B(3)<B(1) AND B(3)<B(2) THEN Z=B(3) 250 IF Z=1 THEN 90 260 IF F(A,Z-1)>0 THEN 90 270 B(K+1)=Z-1 280 NEXT K 290 F(A,B)=9-2*I-J 300 FOR K=1 TO N 310 F(A,B(K+1))=F(A,B) 320 NEXT K 330 GOTO 990 340 A(1)=A 350 B(1)=B 360 A(2)=0:A(3)=0:B(2)=0:B(3)=0 370 FOR K=1 TO N 380 IF M>1 THEN 460 390 IF A(K)=1 OR B(K)=1 THEN 450 400 IF F(A(K)-1,B(K)-1)>0 THEN 450 410 IF F(A(K)-1,B(K))>0 AND F(A(K)-1,B(K))=F(A(K),B(K)-1) THEN 450 420 A(K+1)=A(K)-1 430 B(K+1)=B(K)-1 440 GOTO 530 450 M=2 460 IF A(1)>A(2) AND A(1)>A(3) THEN Z1=A(1) 462 IF A(2)>A(1) AND A(2)>A(3) THEN Z1=A(2) 464 IF A(3)>A(1) AND A(3)>A(2) THEN Z1=A(3) 470 IF B(1)>B(2) AND B(1)>B(3) THEN Z2=B(1) 474 IF B(2)>B(1) AND B(2)>B(3) THEN Z2=B(2) 476 IF B(3)>B(1) AND B(3)>B(2) THEN Z2=B(3) 480 IF Z1=6 OR Z2=6 THEN 90 490 IF F(Z1+1,Z2+1)>0 THEN 90 500 IF F(Z1,Z2+1)>0 AND F(Z1,Z2+1)=F(Z1+1,Z2) THEN 90 510 A(K+1)=Z1+1 520 B(K+1)=Z2+1 530 NEXT K 540 GOTO 950 550 A(1)=A 560 A(2)=7:A(3)=7 570 FOR K=1 TO N 580 IF M>1 THEN 640 590 IF A(K)=6 THEN 630 600 IF F(A(K)+1,B)>0 THEN 630 610 A(K+1)=A(K)+1 620 GOTO 680 630 M=2 640 IF A(1)<A(2) AND A(1)<A(3) THEN Z=A(1) 642 IF A(2)<A(1) AND A(2)<A(3) THEN Z=A(2) 644 IF A(3)<A(1) AND A(3)<A(2) THEN Z=A(3) 650 IF Z=1 THEN 90 660 IF F(Z-1,B)>0 THEN 90 670 A(K+1)=Z-1 680 NEXT K 690 F(A,B)=9-2*I-J 700 FOR K=1 TO N 710 F(A(K+1),B)=F(A,B) 720 NEXT K 730 GOTO 990 740 A(1)=A 750 B(1)=B 760 A(2)=7:A(3)=7 770 B(2)=0:B(3)=0 780 FOR K=1 TO N 790 IF M>1 THEN 870 800 IF A(K)=6 OR B(K)=1 THEN 860 810 IF F(A(K)+1,B(K)-1)>0 THEN 860 820 IF F(A(K)+1,B(K))>0 AND F(A(K)+1,B(K))=F(A(K),B(K)-1) THEN 860 830 A(K+1)=A(K)+1 840 B(K+1)=B(K)-1 850 GOTO 940 860 M=2 870 IF A(1)<A(2) AND A(1)<A(3) THEN Z1=A(1) 872 IF A(2)<A(1) AND A(2)<A(3) THEN Z1=A(2) 874 IF A(3)<A(1) AND A(3)<A(2) THEN Z1=A(3) 880 IF B(1)>B(2) AND B(1)>B(3) THEN Z2=B(1) 882 IF B(2)>B(1) AND B(2)>B(3) THEN Z2=B(2) 884 IF B(3)>B(1) AND B(3)>B(2) THEN Z2=B(3) 890 IF Z1=1 OR Z2=6 THEN 90 900 IF F(Z1-1,Z2+1)>0 THEN 90 910 IF F(Z1,Z2+1)>0 AND F(Z1,Z2+1)=F(Z1-1,Z2) THEN 90 920 A(K+1)=Z1-1 930 B(K+1)=Z2+1 940 NEXT K 950 F(A,B)=9-2*I-J 960 FOR K=1 TO N 970 F(A(K+1),B(K+1))=F(A,B) 980 NEXT K 990 NEXT J 1000 NEXT I 1010 PRINT 1020 PRINT "THE FOLLOWING CODE OF THE BAD GUYS' FLEET DISPOSITION" 1030 PRINT "HAS BEEN CAPTURED BUT NOT DECODED:" 1040 PRINT 1050 FOR I=1 TO 6 1051 FOR J=1 TO 6 1052 H(I,J)=F(J,I) 1053 NEXT J 1054 NEXT I 1060 FOR I=1 TO 6 1061 FOR J=1 TO 6 1062 PRINT H(I,J); 1063 NEXT J 1064 PRINT 1065 NEXT I 1070 PRINT 1080 PRINT "DE-CODE IT AND USE IT IF YOU CAN" 1090 PRINT "BUT KEEP THE DE-CODING METHOD A SECRET." 1100 PRINT 1110 FOR I=1 TO 6 1111 FOR J=1 TO 6 1112 H(I,J)=0 1113 NEXT J 1114 NEXT I 1120 FOR I=1 TO 3 1121 L(I)=0 1122 NEXT I 1130 C(1)=2:C(2)=2 1140 C(3)=1:C(4)=1 1150 C(5)=0:C(6)=0 1160 S=0:H=0 1170 PRINT "START GAME" 1180 INPUT X,Y 1190 IF X<1 OR X>6 OR INT(X)<>ABS(X) THEN 1210 1200 IF Y>0 AND Y<7 AND INT(Y)=ABS(Y) THEN 1230 1210 PRINT "INVALID INPUT. TRY AGAIN." 1220 GOTO 1180 1230 R=7-Y 1240 C=X 1250 IF F(R,C)>0 THEN 1290 1260 S=S+1 1270 PRINT "SPLASH! TRY AGAIN." 1280 GOTO 1180 1290 IF C(F(R,C))<4 THEN 1340 1300 PRINT "THERE USED TO BE A SHIP AT THAT POINT, BUT YOU SUNK IT." 1310 PRINT "SPLASH! TRY AGAIN." 1320 S=S+1 1330 GOTO 1180 1340 IF H(R,C)>0 THEN 1420 1350 H=H+1 1360 H(R,C)=F(R,C) 1370 PRINT "A DIRECT HIT ON SHIP NUMBER";F(R,C) 1380 C(F(R,C))=C(F(R,C))+1 1390 IF C(F(R,C))>=4 THEN 1470 1400 PRINT "TRY AGAIN." 1410 GOTO 1180 1420 PRINT "YOU ALREADY PUT A HOLE IN SHIP NUMBER";F(R,C); 1430 PRINT "AT THAT POINT." 1440 PRINT "SPLASH! TRY AGAIN." 1450 S=S+1 1460 GOTO 1180 1470 L((INT(F(R,C)-1)/2)+1)=L((INT(F(R,C)-1)/2)+1)+1 1480 PRINT "AND YOU SUNK IT. HURRAH FOR THE GOOD GUYS." 1490 PRINT "SO FAR, THE BAD GUYS HAVE LOST" 1500 PRINT L(1);"DESTROYER(S),";L(2);"CRUISER(S), AND"; 1510 PRINT L(3);"AIRCRAFT CARRIER(S)." 1520 PRINT "YOUR CURRENT SPLASH/HIT RATIO IS";S/H 1530 IF (L(1)+L(2)+L(3))<6 THEN 1180 1540 PRINT 1550 PRINT "YOU HAVE TOTALLY WIPED OUT THE BAD GUYS' FLEET" 1560 PRINT "WITH A FINAL SPLASH/HIT RATIO OF";S/H 1570 IF S/H>0 THEN 1590 1580 PRINT "CONGRATULATIONS -- A DIRECT HIT EVERY TIME." 1590 PRINT 1600 PRINT "****************************" 1610 PRINT 1620 GOTO 50 1630 END 2 PRINT TAB(31);"BLACK JACK" 4 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 6 PRINT:PRINT:PRINT 10 DEF FNA(Q)=Q+11*(Q>=22) 20 DIM P(15,12),Q(15),C(52),D(52),T(8),S(7),B(15) 30 DIM R(15) 40 REM--P(I,J) IS THE JTH CARD IN HAND I, Q(I) IS TOTAL OF HAND I 50 REM--C IS THE DECK BEING DEALT FROM, D IS THE DISCARD PILE, 60 REM--T(I) IS THE TOTAL FOR PLAYER I, S(I) IS THE TOTAL THIS HAND FOR 70 REM--PLAYER I, B(I) IS TH BET FOR HAND I 80 REM--R(I) IS THE LENGTH OF P(I,*) 90 GOTO 1500 100 REM--SUBROUTINE TO GET A CARD. RESULT IS PUT IN X. 110 IF C<51 THEN 230 120 PRINT "RESHUFFLING" 130 FOR D=D TO 1 STEP -1 140 C=C-1 150 C(C)=D(D) 160 NEXT D 170 FOR C1=52 TO C STEP -1 180 C2=INT(RND(1)*(C1-C+1))+C 190 C3=C(C2) 200 C(C2)=C(C1) 210 C(C1)=C3 220 NEXT C1 230 X=C(C) 240 C=C+1 250 RETURN 300 REM--SUBROUTINE TO EVALUATE HAND I. TOTAL IS PUT INTO 310 REM--Q(I). TOTALS HAVE THE FOLLOWING MEANING: 320 REM-- 2-10...HARD 2-10 330 REM-- 11-21...SOFT 11-21 340 REM-- 22-32...HARD 11-21 350 REM-- 33+....BUSTED 360 Q=0 370 FOR Q2=1 TO R(I) 380 X=P(I,Q2) 390 GOSUB 500 400 NEXT Q2 410 Q(I)=Q 420 RETURN 500 REM--SUBROUTINE TO ADD CARD X TO TOTAL Q. 510 X1=X: IF X1>10 THEN X1=10: REM SAME AS X1=10 MIN X 520 Q1=Q+X1 530 IF Q>=11 THEN 590 540 IF X>1 THEN 570 550 Q=Q+11 560 RETURN 570 Q=Q1-11*(Q1>=11) 580 RETURN 590 Q=Q1-(Q<=21 AND Q1>21) 600 IF Q<33 THEN 620 610 Q=-1 620 RETURN 700 REM--CARD PRINTING SUBROUTINE 710 REM D$ DEFINED ELSEWHERE 720 PRINT MID$(D$,3*X-2,3); 730 PRINT " "; 740 RETURN 750 REM--ALTERNATIVE PRINTING ROUTINE 760 PRINT " ";MID$(D$,3*X-1,2); 770 PRINT " "; 780 RETURN 800 REM--SUBROUTINE TO PLAY OUT A HAND. 810 REM--NO SPLITTING OR BLACKJACKS ALLOWED 820 H1=5 830 GOSUB 1410 840 H1=3 850 ON H GOTO 950,930 860 GOSUB 100 870 B(I)=B(I)*2 880 PRINT "RECEIVED A"; 890 GOSUB 700 900 GOSUB 1100 910 IF Q>0 THEN GOSUB 1300 920 RETURN 930 GOSUB 1320 940 RETURN 950 GOSUB 100 960 PRINT "RECEIVED A"; 970 GOSUB 700 980 GOSUB 1100 990 IF Q<0 THEN 940 1000 PRINT "HIT"; 1010 GOTO 830 1100 REM--SUBROUTINE TO ADD A CARD TO ROW I 1110 R(I)=R(I)+1 1120 P(I,R(I))=X 1130 Q=Q(I) 1140 GOSUB 500 1150 Q(I)=Q 1160 IF Q>=0 THEN 1190 1170 PRINT "...BUSTED" 1180 GOSUB 1200 1190 RETURN 1200 REM--SUBROUTINE TO DISCARD ROW I 1210 IF R(I)<>0 THEN 1230 1220 RETURN 1230 D=D+1 1240 D(D)=P(I,R(I)) 1250 R(I)=R(I)-1 1260 GOTO 1210 1300 REM--PRINTS TOTAL OF HAND I 1310 PRINT 1320 AA=Q(I): GOSUB 3400 1325 PRINT "TOTAL IS";AA 1330 RETURN 1400 REM--SUBROUTINE TO READ REPLY 1410 REM I$ DEFINED ELSEWHERE 1420 INPUT H$: H$=LEFT$(H$,1) 1430 FOR H=1 TO H1 STEP 2 1440 IF H$=MID$(I$,H,1) THEN 1480 1450 NEXT H 1460 PRINT "TYPE ";MID$(I$,1,H1-1);" OR ";MID$(I$,H1,2);" PLEASE"; 1470 GOTO 1420 1480 H=(H+1)/2 1490 RETURN 1500 REM--PROGRAM STARTS HERE 1510 REM--INITIALIZE 1520 D$="N A 2 3 4 5 6 7N 8 9 10 J Q K" 1530 I$="H,S,D,/," 1540 FOR I=1 TO 13 1550 FOR J=4*I-3 TO 4*I 1560 D(J)=I 1570 NEXT J 1580 NEXT I 1590 D=52 1600 C=53 1610 PRINT "DO YOU WANT INSTRUCTIONS"; 1620 INPUT H$ 1630 IF LEFT$(H$,1)="N" OR LEFT$(H$,1)="n" THEN 1760 1640 PRINT "THIS IS THE GAME OF 21. AS MANY AS 7 PLAYERS MAY PLAY THE" 1650 PRINT "GAME. ON EACH DEAL, BETS WILL BE ASKED FOR, AND THE" 1660 PRINT "PLAYERS' BETS SHOULD BE TYPED IN. THE CARDS WILL THEN BE" 1670 PRINT "DEALT, AND EACH PLAYER IN TURN PLAYS HIS HAND. THE" 1680 PRINT "FIRST RESPONSE SHOULD BE EITHER 'D', INDICATING THAT THE" 1690 PRINT "PLAYER IS DOUBLING DOWN, 'S', INDICATING THAT HE IS" 1700 PRINT "STANDING, 'H', INDICATING HE WANTS ANOTHER CARD, OR '/'," 1710 PRINT "INDICATING THAT HE WANTS TO SPLIT HIS CARDS. AFTER THE" 1720 PRINT "INITIAL RESPONSE, ALL FURTHER RESPONSES SHOULD BE 'S' OR" 1730 PRINT "'H', UNLESS THE CARDS WERE SPLIT, IN WHICH CASE DOUBLING" 1740 PRINT "DOWN IS AGAIN PERMITTED. IN ORDER TO COLLECT FOR" 1750 PRINT "BLACKJACK, THE INITIAL RESPONSE SHOULD BE 'S'." 1760 PRINT "NUMBER OF PLAYERS"; 1770 INPUT N 1775 PRINT 1780 IF N<1 OR N>7 OR N>INT(N) THEN 1760 1790 FOR I=1 TO 8: T(I)=0: NEXT I 1800 D1=N+1 1810 IF 2*D1+C>=52 THEN GOSUB 120 1820 IF C=2 THEN C=C-1 1830 FOR I=1 TO N: Z(I)=0: NEXT I 1840 FOR I=1 TO 15: B(I)=0: NEXT I 1850 FOR I=1 TO 15: Q(I)=0: NEXT I 1860 FOR I=1 TO 7: S(I)=0: NEXT I 1870 FOR I=1 TO 15: R(I)=0: NEXT I 1880 PRINT "BETS:" 1890 FOR I=1 TO N: PRINT "#";I;: INPUT Z(I): NEXT I 1900 FOR I=1 TO N 1910 IF Z(I)<=0 OR Z(I)>500 THEN 1880 1920 B(I)=Z(I) 1930 NEXT I 1940 PRINT "PLAYER"; 1950 FOR I=1 TO N 1960 PRINT I;" "; 1970 NEXT I 1980 PRINT "DEALER" 1990 FOR J=1 TO 2 2000 PRINT TAB(5); 2010 FOR I=1 TO D1 2020 GOSUB 100 2030 P(I,J)=X 2040 IF J=1 OR I<=N THEN GOSUB 750 2050 NEXT I 2060 PRINT 2070 NEXT J 2080 FOR I=1 TO D1 2090 R(I)=2 2100 NEXT I 2110 REM--TEST FOR INSURANCE 2120 IF P(D1,1)>1 THEN 2240 2130 PRINT "ANY INSURANCE"; 2140 INPUT H$ 2150 IF LEFT$(H$,1)<>"Y" THEN 2240 2160 PRINT "INSURANCE BETS" 2170 FOR I=1 TO N: PRINT "#";I;: INPUT Z(I): NEXT I 2180 FOR I=1 TO N 2190 IF Z(I)<0 OR Z(I)>B(I)/2 THEN 2160 2200 NEXT I 2210 FOR I=1 TO N 2220 S(I)=Z(I)*(3*(-(P(D1,2)>=10))-1) 2230 NEXT I 2240 REM--TEST FOR DEALER BLACKJACK 2250 L1=1: L2=1 2252 IF P(D1,1)=1 AND P(D1,2)>9 THEN L1=0: L2=0 2253 IF P(D1,2)=1 AND P(D1,1)>9 THEN L1=0: L2=0 2254 IF L1<>0 OR L2<>0 THEN 2320 2260 PRINT:PRINT "DEALER HAS A";MID$(D$,3*P(D1,2)-2,3);" IN THE HOLE "; 2270 PRINT "FOR BLACKJACK" 2280 FOR I=1 TO D1 2290 GOSUB 300 2300 NEXT I 2310 GOTO 3140 2320 REM--NO DEALER BLACKJACK 2330 IF P(D1,1)>1 AND P(D1,1)<10 THEN 2350 2340 PRINT:PRINT "NO DEALER BLACKJACK." 2350 REM--NOW PLAY THE HANDS 2360 FOR I=1 TO N 2370 PRINT "PLAYER";I; 2380 H1=7 2390 GOSUB 1410 2400 ON H GOTO 2550,2410,2510,2600 2410 REM--PLAYER WANTS TO STAND 2420 GOSUB 300 2430 IF Q(I)<>21 THEN 2490 2440 PRINT "BLACKJACK" 2450 S(I)=S(I)+1.5*B(I) 2460 B(I)=0 2470 GOSUB 1200 2480 GOTO 2900 2490 GOSUB 1320 2500 GOTO 2900 2510 REM--PLAYER WANTS TO DOUBLE DOWN 2520 GOSUB 300 2530 GOSUB 860 2540 GOTO 2900 2550 REM--PLAYER WANTS TO BE HIT 2560 GOSUB 300 2570 H1=3 2580 GOSUB 950 2590 GOTO 2900 2600 REM--PLAYER WANTS TO SPLIT 2610 L1=P(I,1): IF P(I,1)>10 THEN L1=10 2612 L2=P(I,2): IF P(I,2)>10 THEN L2=10 2614 IF L1=L2 THEN 2640 2620 PRINT "SPLITTING NOT ALLOWED." 2630 GOTO 2370 2640 REM--PLAY OUT SPLIT 2650 I1=I+D1 2660 R(I1)=2 2670 P(I1,1)=P(I,2) 2680 B(I+D1)=B(I) 2690 GOSUB 100 2700 PRINT "FIRST HAND RECEIVES A"; 2710 GOSUB 700 2720 P(I,2)=X 2730 GOSUB 300 2740 PRINT 2750 GOSUB 100 2760 PRINT "SECOND HAND RECEIVES A"; 2770 I=I1 2780 GOSUB 700 2790 P(I,2)=X 2800 GOSUB 300 2810 PRINT 2820 I=I1-D1 2830 IF P(I,1)=1 THEN 2900 2840 REM--NOW PLAY THE TWO HANDS 2850 PRINT "HAND";1-(I>D1); 2860 GOSUB 800 2870 I=I+D1 2880 IF I=I1 THEN 2850 2890 I=I1-D1 2900 NEXT I 2910 GOSUB 300 2920 REM--TEST FOR PLAYING DEALER'S HAND 2930 FOR I=1 TO N 2940 IF R(I)>0 OR R(I+D1)>0 THEN 3010 2950 NEXT I 2960 PRINT "DEALER HAD A"; 2970 X=P(D1,2) 2980 GOSUB 700 2990 PRINT " CONCEALED." 3000 GOTO 3140 3010 PRINT "DEALER HAS A";MID$(D$,3*P(D1,2)-2,3);" CONCEALED "; 3020 I=D1 3030 AA=Q(I): GOSUB 3400 3035 PRINT "FOR A TOTAL OF";AA 3040 IF AA>16 THEN 3130 3050 PRINT "DRAWS"; 3060 GOSUB 100 3070 GOSUB 750 3080 GOSUB 1100 3090 AA=Q: GOSUB 3400 3095 IF Q>0 AND AA<17 THEN 3060 3100 Q(I)=Q-(Q<0)/2 3110 IF Q<0 THEN 3140 3120 AA=Q: GOSUB 3400 3125 PRINT "---TOTAL IS";AA 3130 PRINT 3140 REM--TALLY THE RESULT 3150 REM 3160 Z$="LOSES PUSHES WINS " 3165 PRINT 3170 FOR I=1 TO N 3180 AA=Q(I): GOSUB 3400 3182 AB=Q(I+D1): GOSUB 3410 3184 AC=Q(D1): GOSUB 3420 3186 S(I)=S(I)+B(I)*SGN(AA-AC)+B(I+D1)*SGN(AB-AC) 3188 B(I+D1)=0 3200 PRINT "PLAYER";I; 3210 PRINT MID$(Z$,SGN(S(I))*6+7,6);" "; 3220 IF S(I)<>0 THEN 3250 3230 PRINT " "; 3240 GOTO 3260 3250 PRINT ABS(S(I)); 3260 T(I)=T(I)+S(I) 3270 PRINT "TOTAL=";T(I) 3280 GOSUB 1200 3290 T(D1)=T(D1)-S(I) 3300 I=I+D1 3310 GOSUB 1200 3320 I=I-D1 3330 NEXT I 3340 PRINT "DEALER'S TOTAL=";T(D1) 3345 PRINT 3350 GOSUB 1200 3360 GOTO 1810 3400 AA=AA+11*(AA>=22): RETURN 3410 AB=AB+11*(AB>=22): RETURN 3420 AC=AC+11*(AC>=22): RETURN 10 PRINT TAB(33);"BOMBARDMENT" 20 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 30 PRINT:PRINT:PRINT 100 PRINT "YOU ARE ON A BATTLEFIELD WITH 4 PLATOONS AND YOU" 110 PRINT "HAVE 25 OUTPOSTS AVAILABLE WHERE THEY MAY BE PLACED." 120 PRINT "YOU CAN ONLY PLACE ONE PLATOON AT ANY ONE OUTPOST." 130 PRINT "THE COMPUTER DOES THE SAME WITH ITS FOUR PLATOONS." 135 PRINT 140 PRINT "THE OBJECT OF THE GAME IS TO FIRE MISSLES AT THE" 150 PRINT "OUTPOSTS OF THE COMPUTER. IT WILL DO THE SAME TO YOU." 160 PRINT "THE ONE WHO DESTROYS ALL FOUR OF THE ENEMY'S PLATOONS" 170 PRINT "FIRST IS THE WINNER." 180 PRINT 190 PRINT "GOOD LUCK... AND TELL US WHERE YOU WANT THE BODIES SENT!" 200 PRINT 210 PRINT "TEAR OFF MATRIX AND USE IT TO CHECK OFF THE NUMBERS." 220 FOR R=1 TO 5: PRINT: NEXT R 260 DIM M(100) 270 FOR R=1 TO 5 280 I=(R-1)*5+1 290 PRINT I,I+1,I+2,I+3,I+4 300 NEXT R 350 FOR R=1 TO 10: PRINT: NEXT R 380 C=INT(RND(1)*25)+1 390 D=INT(RND(1)*25)+1 400 E=INT(RND(1)*25)+1 410 F=INT(RND(1)*25)+1 420 IF C=D THEN 390 430 IF C=E THEN 400 440 IF C=F THEN 410 450 IF D=E THEN 400 460 IF D=F THEN 410 470 IF E=F THEN 410 480 PRINT "WHAT ARE YOUR FOUR POSITIONS"; 490 INPUT G,H,K,L 495 PRINT 500 PRINT "WHERE DO YOU WISH TO FIRE YOUR MISSLE"; 510 INPUT Y 520 IF Y=C THEN 710 530 IF Y=D THEN 710 540 IF Y=E THEN 710 550 IF Y=F THEN 710 560 GOTO 630 570 M=INT(RND(1)*25)+1 575 GOTO 1160 580 IF X=G THEN 920 590 IF X=H THEN 920 600 IF X=L THEN 920 610 IF X=K THEN 920 620 GOTO 670 630 PRINT "HA, HA YOU MISSED. MY TURN NOW:" 640 PRINT: PRINT: GOTO 570 670 PRINT "I MISSED YOU, YOU DIRTY RAT. I PICKED";M". YOUR TURN:" 680 PRINT: PRINT: GOTO 500 710 Q=Q+1 720 IF Q=4 THEN 890 730 PRINT "YOU GOT ONE OF MY OUTPOSTS!" 740 IF Q=1 THEN 770 750 IF Q=2 THEN 810 760 IF Q=3 THEN 850 770 PRINT "ONE DOWN, THREE TO GO." 780 PRINT: PRINT: GOTO 570 810 PRINT "TWO DOWN, TWO TO GO." 820 PRINT: PRINT: GOTO 570 850 PRINT "THREE DOWN, ONE TO GO." 860 PRINT: PRINT: GOTO 570 890 PRINT "YOU GOT ME, I'M GOING FAST. BUT I'LL GET YOU WHEN" 900 PRINT "MY TRANSISTO&S RECUP%RA*E!" 910 GOTO 1235 920 Z=Z+1 930 IF Z=4 THEN 1110 940 PRINT "I GOT YOU. IT WON'T BE LONG NOW. POST";X;"WAS HIT." 950 IF Z=1 THEN 990 960 IF Z=2 THEN 1030 970 IF Z=3 THEN 1070 990 PRINT "YOU HAVE ONLY THREE OUTPOSTS LEFT." 1000 PRINT: PRINT: GOTO 500 1030 PRINT "YOU HAVE ONLY TWO OUTPOSTS LEFT." 1040 PRINT: PRINT: GOTO 500 1070 PRINT "YOU HAVE ONLY ONE OUTPOST LEFT." 1080 PRINT: PRINT: GOTO 500 1110 PRINT "YOU'RE DEAD. YOUR LAST OUTPOST WAS AT";X;". HA, HA, HA." 1120 PRINT "BETTER LUCK NEXT TIME." 1150 GOTO 1235 1160 P=P+1 1170 N=P-1 1180 FOR T=1 TO N 1190 IF M=M(T) THEN 570 1200 NEXT T 1210 X=M 1220 M(P)=M 1230 GOTO 580 1235 END 8 PRINT "YOU ARE A PILOT IN A WORLD WAR II BOMBER." 10 INPUT "WHAT SIDE -- ITALY(1), ALLIES(2), JAPAN(3), GERMANY(4)";A 20 IF A>0 AND A<5 THEN 25 22 PRINT "TRY AGAIN..." : GOTO 10 25 ON A GOTO 30, 110, 200, 220 30 INPUT "YOUR TARGET -- ALBANIA(1), GREECE(2), NORTH AFRICA(3)";B 40 IF B>0 AND B<4 THEN 45 42 PRINT "TRY AGAIN..." : GOTO 30 45 PRINT : ON B GOTO 50, 80,90 50 PRINT "SHOULD BE EASY -- YOU'RE FLYING A NAZI-MADE PLANE." 60 GOTO 280 80 PRINT "BE CAREFUL!!!" : GOTO 280 90 PRINT "YOU'RE GOING FOR THE OIL, EH?" : GOTO 280 110 INPUT "AIRCRAFT -- LIBERATOR(1), B-29(2), B-17(3), LANCASTER(4)";G 120 IF G>0 AND G<5 THEN 125 122 PRINT "TRY AGAIN..." : GOTO 110 125 PRINT : ON G GOTO 130, 150, 170, 190 130 PRINT "YOU'VE GOT 2 TONS OF BOMBS FLYING FOR PLOESTI." : GOTO 280 150 PRINT "YOU'RE DUMPING THE A-BOMB ON HIROSHIMA." : GOTO 280 170 PRINT "YOU'RE CHASING THE BISMARK IN THE NORTH SEA." : GOTO 280 190 PRINT "YOU'RE BUSTING A GERMAN HEAVY WATER PLANT IN THE RUHR." 195 GOTO 280 200 PRINT "YOU'RE FLYING A KAMIKAZE MISSION OVER THE USS LEXINGTON." 205 INPUT "YOUR FIRST KAMIKAZE MISSION(Y OR N)";F$ 207 IF F$="N" THEN S=0 : GOTO 358 210 PRINT : IF RND(1)>.65 THEN 325 215 GOTO 380 220 PRINT "A NAZI, EH? OH WELL. ARE YOU GOING FOR RUSSIA(1)," 230 INPUT "ENGLAND(2), OR FRANCE(3)";M : IF M>0 AND M<4 THEN 235 232 PRINT "TRY AGAIN..." : GOTO 220 235 PRINT : ON M GOTO 250, 260, 270 250 PRINT "YOU'RE NEARING STALINGRAD." : GOTO 280 260 PRINT "NEARING LONDON. BE CAREFUL, THEY'VE GOT RADAR." : GOTO 280 270 PRINT "NEARING VERSAILLES. DUCK SOUP. THEY'RE NEARLY DEFENSELESS." 280 PRINT 285 INPUT "HOW MANY MISSIONS HAVE YOU FLOWN";D 290 IF D<160 THEN 300 292 PRINT "MISSIONS, NOT MILES..." 295 PRINT "150 MISSIONS IS HIGH EVEN FOR OLD-TIMERS." 297 PRINT "NOW THEN, "; : GOTO 285 300 PRINT:IF D<100 THEN 310 305 PRINT "THAT'S PUSHING THE ODDS!" : GOTO 320 310 IF D<25 THEN PRINT "FRESH OUT OF TRAINING, EH?" 320 PRINT : IF D<160*RND(1) THEN 330 325 PRINT "DIRECT HIT!!!! "INT(100*RND(1))"KILLED." 327 PRINT "MISSION SUCCESSFUL." : GOTO 390 330 PRINT "MISSED TARGET BY"INT(2+30*RND(1))"MILES!" 335 PRINT "NOW YOU'RE REALLY IN FOR IT !!" : PRINT 340 INPUT "DOES THE ENEMY HAVE GUNS(1), MISSILES(2), OR BOTH(3)";R 345 IF R>0 AND R<4 THEN 350 347 PRINT "TRY AGAIN..." : GOTO 340 350 PRINT : T=0 : IF R=2 THEN 360 355 INPUT "WHAT'S THE PERCENT HIT RATE OF ENEMY GUNNERS (10 TO 50)";S 357 IF S<10 THEN PRINT "YOU LIE, BUT YOU'LL PAY...": GOTO 380 358 PRINT 360 PRINT : IF R>1 THEN T=35 365 IF S+T>100*RND(1) THEN 380 370 PRINT "YOU MADE IT THROUGH TREMENDOUS FLAK!!" : GOTO 390 380 PRINT "* * * * BOOM * * * *" 384 PRINT "YOU HAVE BEEN SHOT DOWN....." 386 PRINT "DEARLY BELOVED, WE ARE GATHERED HERE TODAY TO PAY OUR" 387 PRINT "LAST TRIBUTE..." 390 PRINT:PRINT:PRINT:INPUT "ANOTHER MISSION (Y OR N)";U$ 395 IF U$="Y" THEN 8 400 PRINT "CHICKEN !!!" : PRINT : END 10 PRINT TAB(33);"BOUNCE" 20 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 30 PRINT:PRINT:PRINT 90 DIM T(20) 100 PRINT "THIS SIMULATION LETS YOU SPECIFY THE INITIAL VELOCITY" 110 PRINT "OF A BALL THROWN STRAIGHT UP, AND THE COEFFICIENT OF" 120 PRINT "ELASTICITY OF THE BALL. PLEASE USE A DECIMAL FRACTION" 130 PRINT "COEFFICIENCY (LESS THAN 1)." 131 PRINT 132 PRINT "YOU ALSO SPECIFY THE TIME INCREMENT TO BE USED IN" 133 PRINT "'STROBING' THE BALL'S FLIGHT (TRY .1 INITIALLY)." 134 PRINT 135 INPUT "TIME INCREMENT (SEC)";S2 140 PRINT 150 INPUT "VELOCITY (FPS)";V 160 PRINT 170 INPUT "COEFFICIENT";C 180 PRINT 182 PRINT "FEET" 184 PRINT 186 S1=INT(70/(V/(16*S2))) 190 FOR I=1 TO S1 200 T(I)=V*C^(I-1)/16 210 NEXT I 220 FOR H=INT(-16*(V/32)^2+V^2/32+.5) TO 0 STEP -.5 221 IF INT(H)<>H THEN 225 222 PRINT H; 225 L=0 230 FOR I=1 TO S1 240 FOR T=0 TO T(I) STEP S2 245 L=L+S2 250 IF ABS(H-(.5*(-32)*T^2+V*C^(I-1)*T))>.25 THEN 270 260 PRINT TAB(L/S2);"0"; 270 NEXT T 275 T=T(I+1)/2 276 IF -16*T^2+V*C^(I-1)*T<H THEN 290 280 NEXT I 290 PRINT 300 NEXT H 310 PRINT TAB(1); 320 FOR I=1 TO INT(L+1)/S2+1 330 PRINT "."; 340 NEXT I 350 PRINT 355 PRINT " 0"; 360 FOR I=1 TO INT(L+.9995) 380 PRINT TAB(INT(I/S2));I; 390 NEXT I 400 PRINT 410 PRINT TAB(INT(L+1)/(2*S2)-2);"SECONDS" 420 PRINT 430 GOTO 135 440 END 10 PRINT TAB(34);"BOWL" 20 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 30 PRINT:PRINT:PRINT 270 DIM C(15),A(100,6) 360 PRINT "WELCOME TO THE ALLEY" 450 PRINT "BRING YOUR FRIENDS" 540 PRINT "OKAY LET'S FIRST GET ACQUAINTED" 630 PRINT "" 720 PRINT "THE INSTRUCTIONS (Y/N)" 810 INPUT Z$ 900 IF Z$="Y" THEN 990 960 IF Z$="N" THEN 1530 990 PRINT "THE GAME OF BOWLING TAKES MIND AND SKILL.DURING THE GAME" 1080 PRINT "THE COMPUTER WILL KEEP SCORE.YOU MAY COMPETE WITH" 1170 PRINT "OTHER PLAYERS[UP TO FOUR].YOU WILL BE PLAYING TEN FRAMES" 1260 PRINT "ON THE PIN DIAGRAM 'O' MEANS THE PIN IS DOWN...'+' MEANS THE" 1350 PRINT "PIN IS STANDING.AFTER THE GAME THE COMPUTER WILL SHOW YOUR" 1440 PRINT "SCORES ." 1530 PRINT "FIRST OF ALL...HOW MANY ARE PLAYING"; 1620 INPUT R 1710 PRINT 1800 PRINT "VERY GOOD..." 1890 FOR I=1 TO 100: FOR J=1 TO 6: A(I,J)=0: NEXT J: NEXT I 1980 F=1 2070 FOR P=1 TO R 2160 M=0 2250 B=1 2340 M=0: Q=0 2430 FOR I=1 TO 15: C(I)=0: NEXT I 2520 REM ARK BALL GENERATOR USING MOD '15' SYSTEM 2610 PRINT "TYPE ROLL TO GET THE BALL GOING." 2700 INPUT N$ 2790 K=0: D=0 2880 FOR I=1 TO 20 2970 X=INT(RND(1)*100) 3060 FOR J=1 TO 10 3150 IF X<15*J THEN 3330 3240 NEXT J 3330 C(15*J-X)=1 3420 NEXT I 3510 REM ARK PIN DIAGRAM 3600 PRINT "PLAYER:"P;"FRAME:";F"BALL:"B 3690 FOR I=0 TO 3 3780 PRINT 3870 FOR J=1 TO 4-I 3960 K=K+1 4050 IF C(K)=1 THEN 4320 4140 PRINT TAB(I);"+ "; 4230 GOTO 4410 4320 PRINT TAB(I);"O "; 4410 NEXT J 4500 NEXT I 4590 PRINT "" 4680 REM ARK ROLL ANALYSIS 4770 FOR I=1 TO 10 4860 D=D+C(I) 4950 NEXT I 5040 IF D-M <> 0 THEN 5220 5130 PRINT "GUTTER!!" 5220 IF B<>1 OR D<>10 THEN 5490 5310 PRINT "STRIKE!!!!!" 5400 Q=3 5490 IF B<>2 OR D<>10 THEN 5760 5580 PRINT "SPARE!!!!" 5670 Q=2 5760 IF B<>2 OR D>=10 THEN 6030 5850 PRINT "ERROR!!!" 5940 Q=1 6030 IF B<>1 OR D>=10 THEN 6210 6120 PRINT "ROLL YOUR 2ND BALL" 6210 REM ARK STORAGE OF THE SCORES 6300 PRINT 6390 A(F*P,B)=D 6480 IF B=2 THEN 7020 6570 B=2 6660 M=D 6750 IF Q=3 THEN 6210 6840 A(F*P,B)=D-M 6930 IF Q=0 THEN 2520 7020 A(F*P,3)=Q 7110 NEXT P 7200 F=F+1 7290 IF F<11 THEN 2070 7295 PRINT "FRAMES" 7380 FOR I=1 TO 10 7470 PRINT I; 7560 NEXT I 7650 PRINT 7740 FOR P=1 TO R 7830 FOR I=1 TO 3 7920 FOR J=1 TO 10 8010 PRINT A(J*P,I); 8100 NEXT J 8105 PRINT 8190 NEXT I 8280 PRINT 8370 NEXT P 8460 PRINT "DO YOU WANT ANOTHER GAME" 8550 INPUT A$ 8640 IF LEFT$(A$,1)="Y" THEN 2610 8730 END 1 PRINT TAB(33);"BOXING" 2 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 3 PRINT:PRINT:PRINT 4 PRINT "BOXING OLYMPIC STYLE (3 ROUNDS -- 2 OUT OF 3 WINS)" 5 J=0 6 L=0 8 PRINT 10 PRINT "WHAT IS YOUR OPPONENT'S NAME"; 20 INPUT J$ 30 PRINT "INPUT YOUR MAN'S NAME"; 40 INPUT L$ 50 PRINT "DIFFERENT PUNCHES ARE: (1) FULL SWING; (2) HOOK; (3) UPPERCUT; (4) JAB." 60 PRINT "WHAT IS YOUR MANS BEST"; 64 INPUT B 70 PRINT "WHAT IS HIS VULNERABILITY"; 80 INPUT D 90 B1=INT(4*RND(1)+1) 100 D1=INT(4*RND(1)+1) 110 IF B1=D1 THEN 90 120 PRINT J$;"'S ADVANTAGE IS";B1;"AND VULNERABILITY IS SECRET.":PRINT 130 FOR R=1 TO 3 140 IF J>= 2 THEN 1040 150 IF L>=2 THEN 1060 160 X=0 170 Y=0 180 PRINT "ROUND";R;"BEGINS..." 185 FOR R1= 1 TO 7 190 I=INT(10*RND(1)+1) 200 IF I>5 THEN 600 210 PRINT L$;"'S PUNCH"; 220 INPUT P 221 IF P=B THEN 225 222 GOTO 230 225 X=X+2 230 IF P=1 THEN 340 240 IF P=2 THEN 450 250 IF P=3 THEN 520 270 PRINT L$;" JABS AT ";J$"'S HEAD "; 271 IF D1=4 THEN 290 275 C=INT(8*RND(1)+1) 280 IF C<4 THEN 310 290 X=X+3 300 GOTO 950 310 PRINT "IT'S BLOCKED." 330 GOTO 950 340 PRINT L$ " SWINGS AND "; 341 IF D1=4 THEN 410 345 X3=INT(30*RND(1)+1) 350 IF X3<10 THEN 410 360 PRINT "HE MISSES "; 370 PRINT 375 IF X=1 THEN 950 380 PRINT 390 PRINT 400 GOTO 300 410 PRINT "HE CONNECTS!" 420 IF X>35 THEN 980 425 X=X+15 440 GOTO 300 450 PRINT L$;" GIVES THE HOOK... "; 455 IF D1=2 THEN 480 460 H1=INT(2*RND(1)+1) 470 IF H1=1 THEN 500 475 PRINT "CONNECTS..." 480 X=X+7 490 GOTO 300 500 PRINT "BUT IT'S BLOCKED!!!!!!!!!!!!!" 510 GOTO 300 520 PRINT L$ " TRIES AN UPPERCUT "; 530 IF D1=3 THEN 570 540 D5=INT(100*RND(1)+1) 550 IF D5<51 THEN 570 560 PRINT "AND IT'S BLOCKED (LUCKY BLOCK!)" 565 GOTO 300 570 PRINT "AND HE CONNECTS!" 580 X=X+4 590 GOTO 300 600 J7=INT(4*RND(1)+1) 601 IF J7 =B1 THEN 605 602 GOTO 610 605 Y=Y+2 610 IF J7=1 THEN 720 620 IF J7=2 THEN 810 630 IF J7 =3 THEN 860 640 PRINT J$;" JABS AND "; 645 IF D=4 THEN 700 650 Z4=INT(7*RND(1)+1) 655 IF Z4>4 THEN 690 660 PRINT "IT'S BLOCKED!" 670 GOTO 300 690 PRINT " BLOOD SPILLS !!!" 700 Y=Y+5 710 GOTO 300 720 PRINT J$" TAKES A FULL SWING AND"; 730 IF D=1 THEN 770 740 R6=INT(60*RND(1)+1) 745 IF R6 <30 THEN 770 750 PRINT " IT'S BLOCKED!" 760 GOTO 300 770 PRINT " POW!!!!! HE HITS HIM RIGHT IN THE FACE!" 780 IF Y>35 THEN 1010 790 Y=Y+15 800 GOTO 300 810 PRINT J$;" GETS ";L$;" IN THE JAW (OUCH!)" 820 Y=Y+7 830 PRINT "....AND AGAIN!" 835 Y=Y+5 840 IF Y>35 THEN 1010 850 PRINT 860 PRINT L$;" IS ATTACKED BY AN UPPERCUT (OH,OH)..." 865 IF D=3 THEN 890 870 Q4=INT(200*RND(1)+1) 880 IF Q4>75 THEN 920 890 PRINT "AND ";J$;" CONNECTS..." 900 Y=Y+8 910 GOTO 300 920 PRINT " BLOCKS AND HITS ";J$;" WITH A HOOK." 930 X=X+5 940 GOTO 300 950 NEXT R1 951 IF X>Y THEN 955 952 PRINT:PRINT J$" WINS ROUND" R 953 J=J+1 954 GOTO 960 955 PRINT:PRINT L$" WINS ROUND"R 956 L=L+1 960 NEXT R 961 IF J>= 2 THEN 1040 962 IF L>=2 THEN 1060 980 PRINT J$ " IS KNOCKED COLD AND " L$" IS THE WINNER AND CHAMP!"; 1000 GOTO 1080 1010 PRINT L$ " IS KNOCKED COLD AND " J$" IS THE WINNER AND CHAMP!"; 1030 GOTO 1000 1040 PRINT J$ " WINS (NICE GOING," J$;")." 1050 GOTO 1000 1060 PRINT L$ " AMAZINGLY WINS!!" 1070 GOTO 1000 1080 PRINT 1085 PRINT 1090 PRINT "AND NOW GOODBYE FROM THE OLYMPIC ARENA." 1100 PRINT 1110 END 10 PRINT TAB(34);"BUG" 20 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 30 PRINT:PRINT:PRINT 40 REM 50 A=0: B=0: H=0: L=0: N=0: P=0: Q=0: R=0: S=0: T=0: U=0: V=0: Y=0 60 PRINT "THE GAME BUG" 70 PRINT "I HOPE YOU ENJOY THIS GAME." 80 PRINT 90 PRINT "DO YOU WANT INSTRUCTIONS"; 100 INPUT Z$ 110 IF Z$="NO" THEN 300 120 PRINT "THE OBJECT OF BUG IS TO FINISH YOUR BUG BEFORE I FINISH" 130 PRINT "MINE. EACH NUMBER STANDS FOR A PART OF THE BUG BODY." 140 PRINT "I WILL ROLL THE DIE FOR YOU, TELL YOU WHAT I ROLLED FOR YOU" 150 PRINT "WHAT THE NUMBER STANDS FOR, AND IF YOU CAN GET THE PART." 160 PRINT "IF YOU CAN GET THE PART I WILL GIVE IT TO YOU." 170 PRINT "THE SAME WILL HAPPEN ON MY TURN." 180 PRINT "IF THERE IS A CHANGE IN EITHER BUG I WILL GIVE YOU THE" 190 PRINT "OPTION OF SEEING THE PICTURES OF THE BUGS." 200 PRINT "THE NUMBERS STAND FOR PARTS AS FOLLOWS:" 210 PRINT "NUMBER","PART","NUMBER OF PART NEEDED" 220 PRINT "1","BODY","1" 230 PRINT "2","NECK","1" 240 PRINT "3","HEAD","1" 250 PRINT "4","FEELERS","2" 260 PRINT "5","TAIL","1" 270 PRINT "6","LEGS","6" 280 PRINT 290 PRINT 300 IF Y>0 THEN 2480 310 Z=INT(6*RND(1)+1) 320 C=1 330 PRINT "YOU ROLLED A";Z 340 ON Z GOTO 350,430,540,650,760,870 350 PRINT "1=BODY" 360 IF B=1 THEN 410 370 PRINT "YOU NOW HAVE A BODY." 380 B=1 390 C=0 400 GOTO 970 410 PRINT "YOU DO NOT NEED A BODY." 420 GOTO 970 430 PRINT "2=NECK" 440 IF N=1 THEN 500 450 IF B=0 THEN 520 460 PRINT "YOU NOW HAVE A NECK." 470 N=1 480 C=0 490 GOTO 970 500 PRINT "YOU DO NOT NEED A NECK." 510 GOTO 970 520 PRINT "YOU DO NOT HAVE A BODY." 530 GOTO 970 540 PRINT "3=HEAD" 550 IF N=0 THEN 610 560 IF H=1 THEN 630 570 PRINT "YOU NEEDED A HEAD." 580 H=1 590 C=0 600 GOTO 970 610 PRINT "YOU DO NOT HAVE A NECK." 620 GOTO 970 630 PRINT "YOU HAVE A HEAD." 640 GOTO 970 650 PRINT "4=FEELERS" 660 IF H=0 THEN 740 670 IF A=2 THEN 720 680 PRINT "I NOW GIVE YOU A FEELER." 690 A=A+1 700 C=0 710 GOTO 970 720 PRINT "YOU HAVE TWO FEELERS ALREADY." 730 GOTO 970 740 PRINT "YOU DO NOT HAVE A HEAD." 750 GOTO 970 760 PRINT "5=TAIL" 770 IF B=0 THEN 830 780 IF T=1 THEN 850 790 PRINT "I NOW GIVE YOU A TAIL." 800 T=T+1 810 C=0 820 GOTO 970 830 PRINT "YOU DO NOT HAVE A BODY." 840 GOTO 970 850 PRINT "YOU ALREADY HAVE A TAIL." 860 GOTO 970 870 PRINT "6=LEG" 880 IF L=6 THEN 940 890 IF B=0 THEN 960 900 L=L+1 910 C=0 920 PRINT "YOU NOW HAVE";L;"LEGS." 930 GOTO 970 940 PRINT "YOU HAVE 6 FEET ALREADY." 950 GOTO 970 960 PRINT "YOU DO NOT HAVE A BODY." 970 X=INT(6*RND(1)+1) 971 PRINT 975 FOR DELAY=1 TO 2000:NEXT DELAY 980 PRINT "I ROLLED A";X 990 ON X GOTO 1000,1080,1190,1300,1410,1520 1000 PRINT "1=BODY" 1010 IF P=1 THEN 1060 1020 PRINT "I NOW HAVE A BODY." 1030 C=0 1040 P=1 1050 GOTO 1630 1060 PRINT "I DO NOT NEED A BODY." 1070 GOTO 1630 1080 PRINT "2=NECK" 1090 IF Q=1 THEN 1150 1100 IF P=0 THEN 1170 1110 PRINT "I NOW HAVE A NECK." 1120 Q=1 1130 C=0 1140 GOTO 1630 1150 PRINT "I DO NOT NEED A NECK." 1160 GOTO 1630 1170 PRINT "I DO NOT HAVE A BODY." 1180 GOTO 1630 1190 PRINT "3=HEAD" 1200 IF Q=0 THEN 1260 1210 IF R=1 THEN 1280 1220 PRINT "I NEEDED A HEAD." 1230 R=1 1240 C=0 1250 GOTO 1630 1260 PRINT "I DO NOT HAVE A NECK." 1270 GOTO 1630 1280 PRINT "I DO NOT NEED A HEAD." 1290 GOTO 1630 1300 PRINT "4=FEELERS" 1310 IF R=0 THEN 1390 1320 IF S=2 THEN 1370 1330 PRINT "I GET A FEELER." 1340 S=S+1 1350 C=0 1360 GOTO 1630 1370 PRINT "I HAVE 2 FEELERS ALREADY." 1380 GOTO 1630 1390 PRINT "I DO NOT HAVE A HEAD." 1400 GOTO 1630 1410 PRINT "5=TAIL" 1420 IF P=0 THEN 1480 1430 IF U=1 THEN 1500 1440 PRINT "I NOW HAVE A TAIL." 1450 U=1 1460 C=0 1470 GOTO 1630 1480 PRINT "I DO NOT HAVE A BODY." 1490 GOTO 1630 1500 PRINT "I DO NOT NEED A TAIL." 1510 GOTO 1630 1520 PRINT "6=LEGS" 1530 IF V=6 THEN 1590 1540 IF P=0 THEN 1610 1550 V=V+1 1560 C=0 1570 PRINT "I NOW HAVE";V;"LEGS." 1580 GOTO 1630 1590 PRINT,"I HAVE 6 FEET." 1600 GOTO 1630 1610 PRINT "I DO NOT HAVE A BODY." 1620 GOTO 1630 1630 IF A=2 AND T=1 AND L=6 THEN 1650 1640 GOTO 1670 1650 PRINT "YOUR BUG IS FINISHED." 1660 Y=Y+1 1670 IF S=2 AND P=1 AND V=6 THEN 1690 1680 GOTO 1710 1690 PRINT "MY BUG IS FINISHED." 1700 Y=Y+2 1710 IF C=1 THEN 300 1720 PRINT "DO YOU WANT THE PICTURES"; 1730 INPUT Z$ 1740 IF Z$="NO" THEN 300 1750 PRINT "*****YOUR BUG*****" 1760 PRINT 1770 PRINT 1780 IF A=0 THEN 1860 1790 FOR Z=1 TO 4 1800 FOR X=1 TO A 1810 PRINT TAB(10); 1820 PRINT "A "; 1830 NEXT X 1840 PRINT 1850 NEXT Z 1860 IF H=0 THEN 1880 1870 GOSUB 2470 1880 IF N=0 THEN 1920 1890 FOR Z=1 TO 2 1900 PRINT " N N" 1910 NEXT Z 1920 IF B=0 THEN 2000 1930 PRINT " BBBBBBBBBBBB" 1940 FOR Z=1 TO 2 1950 PRINT " B B" 1960 NEXT Z 1970 IF T<>1 THEN 1990 1980 PRINT "TTTTTB B" 1990 PRINT " BBBBBBBBBBBB" 2000 IF L=0 THEN 2080 2010 FOR Z=1 TO 2 2020 PRINT TAB(5); 2030 FOR X=1 TO L 2040 PRINT " L"; 2050 NEXT X 2060 PRINT 2070 NEXT Z 2080 FOR Z=1 TO 4 2090 PRINT 2100 NEXT Z 2110 PRINT "*****MY BUG*****" 2120 PRINT 2130 PRINT 2140 PRINT 2150 IF S=0 THEN 2230 2160 FOR Z=1 TO 4 2170 PRINT TAB(10); 2180 FOR X=1 TO S 2190 PRINT "F "; 2200 NEXT X 2210 PRINT 2220 NEXT Z 2230 IF R<>1 THEN 2250 2240 GOSUB 2470 2250 IF Q=0 THEN 2280 2260 PRINT " N N" 2270 PRINT " N N" 2280 IF P=0 THEN 2360 2290 PRINT " BBBBBBBBBBBB" 2300 FOR Z=1 TO 2 2310 PRINT " B B" 2320 NEXT Z 2330 IF U<>1 THEN 2350 2340 PRINT "TTTTTB B" 2350 PRINT " BBBBBBBBBBBB" 2360 IF V=0 THEN 2450 2370 FOR Z=1 TO 2 2380 PRINT TAB(5); 2390 FOR X=1 TO V 2400 PRINT " L"; 2410 NEXT X 2420 PRINT 2430 NEXT Z 2450 IF Y<>0 THEN 2540 2460 GOTO 300 2470 PRINT " HHHHHHH" 2480 PRINT " H H" 2490 PRINT " H O O H" 2500 PRINT " H H" 2510 PRINT " H V H" 2520 PRINT " HHHHHHH" 2530 RETURN 2540 PRINT "I HOPE YOU ENJOYED THE GAME, PLAY IT AGAIN SOON!!" 2550 END 10 PRINT TAB(34);"BULL" 20 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 30 DEF FNA(K)=INT(RND(1)*2+1) 200 PRINT:PRINT:PRINT 202 L=1 205 PRINT "DO YOU WANT INSTRUCTIONS"; 206 INPUT Z$ 207 IF Z$="NO" THEN 400 210 PRINT "HELLO, ALL YOU BLOODLOVERS AND AFICIONADOS." 220 PRINT "HERE IS YOUR BIG CHANCE TO KILL A BULL." 230 PRINT 240 PRINT "ON EACH PASS OF THE BULL, YOU MAY TRY" 250 PRINT "0 - VERONICA (DANGEROUS INSIDE MOVE OF THE CAPE)" 260 PRINT "1 - LESS DANGEROUS OUTSIDE MOVE OF THE CAPE" 270 PRINT "2 - ORDINARY SWIRL OF THE CAPE." 280 PRINT 290 PRINT "INSTEAD OF THE ABOVE, YOU MAY TRY TO KILL THE BULL" 300 PRINT "ON ANY TURN: 4 (OVER THE HORNS), 5 (IN THE CHEST)." 310 PRINT "BUT IF I WERE YOU," 320 PRINT "I WOULDN'T TRY IT BEFORE THE SEVENTH PASS." 330 PRINT 340 PRINT "THE CROWD WILL DETERMINE WHAT AWARD YOU DESERVE" 350 PRINT "(POSTHUMOUSLY IF NECESSARY)." 360 PRINT "THE BRAVER YOU ARE, THE BETTER THE AWARD YOU RECIEVE." 370 PRINT 380 PRINT "THE BETTER THE JOB THE PICADORES AND TOREADORES DO," 390 PRINT "THE BETTER YOUR CHANCES ARE." 400 PRINT 410 PRINT 420 D(5)=1 430 D(4)=1 450 DIM L$(5) 455 A=INT(RND(1)*5+1) 460 FOR I=1 TO 5 463 READ L$(I) 467 NEXT I 470 DATA "SUPERB","GOOD","FAIR","POOR","AWFUL" 490 PRINT "YOU HAVE DRAWN A ";L$(A);" BULL." 500 IF A>4 THEN 530 510 IF A<2 THEN 550 520 GOTO 570 530 PRINT "YOU'RE LUCKY." 540 GOTO 570 550 PRINT "GOOD LUCK. YOU'LL NEED IT." 560 PRINT 570 PRINT 590 A$="PICADO" 595 B$="RES" 600 GOSUB 1610 610 D(1)=C 630 A$="TOREAD" 635 B$="ORES" 640 GOSUB 1610 650 D(2)=C 660 PRINT 670 PRINT 680 IF Z=1 THEN 1310 690 D(3)=D(3)+1 700 PRINT "PASS NUMBER";D(3) 710 IF D(3)<3 THEN 760 720 PRINT "HERE COMES THE BULL. TRY FOR A KILL"; 730 GOSUB 1930 735 IF Z1=1 THEN 1130 740 PRINT "CAPE MOVE"; 750 GOTO 800 760 PRINT "THE BULL IS CHARGING AT YOU! YOU ARE THE MATADOR--" 770 PRINT "DO YOU WANT TO KILL THE BULL"; 780 GOSUB 1930 785 IF Z1=1 THEN 1130 790 PRINT "WHAT MOVE DO YOU MAKE WITH THE CAPE"; 800 INPUT E 810 IF E<>INT(ABS(E)) THEN 830 820 IF E<3 THEN 850 830 PRINT "DON'T PANIC, YOU IDIOT! PUT DOWN A CORRECT NUMBER" 840 GOTO 800 850 REM 860 IF E=0 THEN 920 870 IF E=1 THEN 900 880 M=.5 890 GOTO 930 900 M=2 910 GOTO 930 920 M=3 930 L=L+M 940 F=(6-A+M/10)*RND(1)/((D(1)+D(2)+D(3)/10)*5) 950 IF F<.51 THEN 660 960 PRINT "THE BULL HAS GORED YOU!" 970 ON FNA(0) GOTO 980,1010 980 PRINT "YOU ARE DEAD." 990 D(4)=1.5 1000 GOTO 1310 1010 PRINT "YOU ARE STILL ALIVE.":PRINT 1020 PRINT "DO YOU RUN FROM THE RING"; 1030 GOSUB 1930 1035 IF Z1=2 THEN 1070 1040 PRINT "COWARD" 1050 D(4)=0 1060 GOTO 1310 1070 PRINT "YOU ARE BRAVE. STUPID, BUT BRAVE." 1080 ON FNA(0) GOTO 1090,1110 1090 D(4)=2 1100 GOTO 660 1110 PRINT "YOU ARE GORED AGAIN!" 1120 GOTO 970 1130 REM 1140 Z=1 1150 PRINT:PRINT "IT IS THE MOMENT OF TRUTH.":PRINT 1155 PRINT "HOW DO YOU TRY TO KILL THE BULL"; 1160 INPUT H 1170 IF H=4 THEN 1230 1180 IF H=5 THEN 1230 1190 PRINT "YOU PANICKED. THE BULL GORED YOU." 1220 GOTO 970 1230 K=(6-A)*10*RND(1)/((D(1)+D(2))*5*D(3)) 1240 IF J=4 THEN 1290 1250 IF K>.2 THEN 960 1260 PRINT "YOU KILLED THE BULL!" 1270 D(5)=2 1280 GOTO 1320 1290 IF K>.8 THEN 960 1300 GOTO 1260 1310 PRINT 1320 PRINT 1330 PRINT 1340 IF D(4)<>0 THEN 1390 1350 PRINT "THE CROWD BOOS FOR TEN MINUTES. IF YOU EVER DARE TO SHOW" 1360 PRINT "YOUR FACE IN A RING AGAIN, THEY SWEAR THEY WILL KILL YOU--" 1370 PRINT "UNLES THE BULL DOES FIRST." 1380 GOTO 1580 1390 DEF FNC(Q)=FND(Q)*RND(1) 1395 DEF FND(Q)=(4.5+L/6-(D(1)+D(2))*2.5+4*D(4)+2*D(5)-D(3)^2/120-A) 1400 IF D(4)<>2 THEN 1430 1410 PRINT "THE CROWD CHEERS WILDLY!" 1420 GOTO 1450 1430 IF D(5)<>2 THEN 1450 1440 PRINT "THE CROWD CHEERS!":PRINT 1450 PRINT "THE CROWD AWARDS YOU" 1460 IF FNC(Q)<2.4 THEN 1570 1470 IF FNC(Q)<4.9 THEN 1550 1480 IF FNC(Q)<7.4 THEN 1520 1500 PRINT "OLE! YOU ARE 'MUY HOMBRE'!! OLE! OLE!" 1510 GOTO 1580 1520 PRINT "BOTH EARS OF THE BULL!" 1530 PRINT "OLE!" 1540 GOTO 1580 1550 PRINT "ONE EAR OF THE BULL." 1560 GOTO 1580 1570 PRINT "NOTHING AT ALL." 1580 PRINT 1590 PRINT "ADIOS":PRINT:PRINT:PRINT 1600 GOTO 2030 1610 B=3/A*RND(1) 1620 IF B<.37 THEN 1740 1630 IF B<.5 THEN 1720 1640 IF B<.63 THEN 1700 1650 IF B<.87 THEN 1680 1660 C=.1 1670 GOTO 1750 1680 C=.2 1690 GOTO 1750 1700 C=.3 1710 GOTO 1750 1720 C=.4 1730 GOTO 1750 1740 C=.5 1750 T=INT(10*C+.2) 1760 PRINT "THE ";A$;B$;" DID A ";L$(T);" JOB." 1770 IF 4>T THEN 1900 1780 IF 5=T THEN 1870 1790 ON FNA(K) GOTO 1830,1850 1800 IF A$="TOREAD" THEN 1820 1810 PRINT "ONE OF THE HORSES OF THE ";A$;B$;" WAS KILLED." 1820 ON FNA(K) GOTO 1830,1850 1830 PRINT "ONE OF THE ";A$;B$;" WAS KILLED." 1840 GOTO 1900 1850 PRINT "NO ";A$;B$;" WERE KILLED." 1860 GOTO 1900 1870 IF A$="TOREAD" THEN 1890 1880 PRINT FNA(K);"OF THE HORSES OF THE ";A$;B$;" KILLED." 1890 PRINT FNA(K);"OF THE ";A$;B$;" KILLED." 1900 PRINT 1910 RETURN 1920 REM 1930 INPUT A$ 1940 IF A$="YES" THEN 1990 1950 IF A$="NO" THEN 2010 1970 PRINT "INCORRECT ANSWER - - PLEASE TYPE 'YES' OR 'NO'." 1980 GOTO 1930 1990 Z1=1 2000 GOTO 2020 2010 Z1=2 2020 RETURN 2030 END 5 PRINT TAB(32);"BULLSEYE" 10 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 20 PRINT:PRINT:PRINT 30 PRINT "IN THIS GAME, UP TO 20 PLAYERS THROW DARTS AT A TARGET" 40 PRINT "WITH 10, 20, 30, AND 40 POINT ZONES. THE OBJECTIVE IS" 50 PRINT "TO GET 200 POINTS.": PRINT 60 PRINT "THROW",TAB(20);"DESCRIPTION";TAB(45);"PROBABLE SCORE" 70 PRINT" 1";TAB(20);"FAST OVERARM";TAB(45);"BULLSEYE OR COMPLETE MISS" 80 PRINT" 2";TAB(20);"CONTROLLED OVERARM";TAB(45);"10, 20 OR 30 POINTS" 90 PRINT" 3";TAB(20);"UNDERARM";TAB(45);"ANYTHING":PRINT 100 DIM A$(20),S(20),W(10): M=0: R=0: FOR I=1 TO 20: S(I)=0: NEXT I 110 INPUT "HOW MANY PLAYERS";N: PRINT 120 FOR I=1 TO N 130 PRINT "NAME OF PLAYER #";I;:INPUT A$(I) 140 NEXT I 150 R=R+1: PRINT: PRINT "ROUND";R:PRINT "---------" 160 FOR I=1 TO N 170 PRINT: PRINT A$(I)"'S THROW";: INPUT T 180 IF T<0 OR T>3 THEN PRINT "INPUT 1, 2, OR 3!": GOTO 170 190 ON T GOTO 200, 210, 200 200 P1=.65: P2=.55: P3=.5: P4=.5: GOTO 230 210 P1=.99: P2=.77: P3=.43: P4=.01: GOTO 230 220 P1=.95: P2=.75: P3=.45: P4=.05 230 U=RND(1) 240 IF U>=P1 THEN PRINT "BULLSEYE!! 40 POINTS!":B=40: GOTO 290 250 IF U>=P2 THEN PRINT "30-POINT ZONE!":B=30: GOTO 290 260 IF U>=P3 THEN PRINT "20-POINT ZONE":B=20: GOTO 290 270 IF U>=P4 THEN PRINT "WHEW! 10 POINTS.":B=10: GOTO 290 280 PRINT "MISSED THE TARGET! TOO BAD.": B=0 290 S(I)=S(I)+B: PRINT "TOTAL SCORE =";S(I): NEXT I 300 FOR I=1 TO N 310 IF S(I)>=200 THEN M=M+1: W(M)=I 320 NEXT I 330 IF M=0 THEN 150 340 PRINT: PRINT "WE HAVE A WINNER!!": PRINT 350 FOR I=1 TO M: PRINT A$(W(I));" SCORED";S(W(I));"POINTS.": NEXT I 360 PRINT: PRINT "THANKS FOR THE GAME.": END 10 PRINT TAB(33);"BUNNY" 20 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 30 PRINT: PRINT: PRINT 100 REM "BUNNY" FROM AHL'S 'BASIC COMPUTER GAMES' 110 REM 120 FOR I=0 TO 4: READ B(I): NEXT I 130 GOSUB 260 140 L=64: REM ASCII LETTER CODE... 150 REM 160 PRINT 170 READ X: IF X<0 THEN 160 175 IF X>128 THEN 240 180 PRINT TAB(X);: READ Y 190 FOR I=X TO Y: J=I-5*INT(I/5) 200 PRINT CHR$(L+B(J)); 210 NEXT I 220 GOTO 170 230 REM 240 GOSUB 260: GOTO 450 250 REM 260 FOR I=1 TO 6: PRINT CHR$(10);: NEXT I 270 RETURN 280 REM 290 DATA 2,21,14,14,25 300 DATA 1,2,-1,0,2,45,50,-1,0,5,43,52,-1,0,7,41,52,-1 310 DATA 1,9,37,50,-1,2,11,36,50,-1,3,13,34,49,-1,4,14,32,48,-1 320 DATA 5,15,31,47,-1,6,16,30,45,-1,7,17,29,44,-1,8,19,28,43,-1 330 DATA 9,20,27,41,-1,10,21,26,40,-1,11,22,25,38,-1,12,22,24,36,-1 340 DATA 13,34,-1,14,33,-1,15,31,-1,17,29,-1,18,27,-1 350 DATA 19,26,-1,16,28,-1,13,30,-1,11,31,-1,10,32,-1 360 DATA 8,33,-1,7,34,-1,6,13,16,34,-1,5,12,16,35,-1 370 DATA 4,12,16,35,-1,3,12,15,35,-1,2,35,-1,1,35,-1 380 DATA 2,34,-1,3,34,-1,4,33,-1,6,33,-1,10,32,34,34,-1 390 DATA 14,17,19,25,28,31,35,35,-1,15,19,23,30,36,36,-1 400 DATA 14,18,21,21,24,30,37,37,-1,13,18,23,29,33,38,-1 410 DATA 12,29,31,33,-1,11,13,17,17,19,19,22,22,24,31,-1 420 DATA 10,11,17,18,22,22,24,24,29,29,-1 430 DATA 22,23,26,29,-1,27,29,-1,28,29,-1,4096 440 REM 450 END 10 PRINT TAB(26);"BUZZWORD GENERATOR" 20 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 30 PRINT:PRINT:PRINT 40 PRINT "THIS PROGRAM PRINTS HIGHLY ACCEPTABLE PHRASES IN" 50 PRINT "'EDUCATOR-SPEAK'THAT YOU CAN WORK INTO REPORTS" 60 PRINT "AND SPEECHES. WHENEVER A QUESTION MARK IS PRINTED," 70 PRINT "TYPE A 'Y' FOR ANOTHER PHRASE OR 'N' TO QUIT." 80 PRINT:PRINT:PRINT "HERE'S THE FIRST PHRASE:" 90 DIM A$(40) 100 FOR I=1 TO 39 : READ A$(I) : NEXT I 110 PRINT A$(INT(13*RND(1)+1));" "; 120 PRINT A$(INT(13*RND(1)+14));" "; 130 PRINT A$(INT(13*RND(1)+27)) : PRINT 150 INPUT Y$ : IF Y$="Y" THEN 110 160 GOTO 999 200 DATA "ABILITY","BASAL","BEHAVIORAL","CHILD-CENTERED" 210 DATA "DIFFERENTIATED","DISCOVERY","FLEXIBLE","HETEROGENEOUS" 220 DATA "HOMOGENEOUS","MANIPULATIVE","MODULAR","TAVISTOCK" 230 DATA "INDIVIDUALIZED","LEARNING","EVALUATIVE","OBJECTIVE" 240 DATA "COGNITIVE","ENRICHMENT","SCHEDULING","HUMANISTIC" 250 DATA "INTEGRATED","NON-GRADED","TRAINING","VERTICAL AGE" 260 DATA "MOTIVATIONAL","CREATIVE","GROUPING","MODIFICATION" 270 DATA "ACCOUNTABILITY","PROCESS","CORE CURRICULUM","ALGORITHM" 280 DATA "PERFORMANCE","REINFORCEMENT","OPEN CLASSROOM","RESOURCE" 290 DATA "STRUCTURE","FACILITY","ENVIRONMENT" 999 PRINT "COME BACK WHEN YOU NEED HELP WITH ANOTHER REPORT!":END 10 PRINT TAB(32);"CALENDAR" 20 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 30 PRINT:PRINT:PRINT 100 REM VALUES FOR 1979 - SEE NOTES 110 DIM M(12) 120 FOR I=1 TO 6: PRINT CHR$(10);: NEXT I 130 D=1: REM 1979 STARTS ON MONDAY (0=SUN, -1=MON, -2=TUES...) 140 S=0 150 REM READ DAYS OF EACH MONTH 160 FOR N=0 TO 12: READ M(N): NEXT N 170 REM 180 FOR N=1 TO 12 190 PRINT: PRINT: S=S+M(N-1) 200 PRINT "**";S;TAB(7); 210 FOR I=1 TO 18: PRINT "*";: NEXT I 220 ON N GOTO 230,240,250,260,270,280,290,300,310,320,330,340 230 PRINT " JANUARY ";: GOTO 350 240 PRINT " FEBRUARY";: GOTO 350 250 PRINT " MARCH ";: GOTO 350 260 PRINT " APRIL ";: GOTO 350 270 PRINT " MAY ";: GOTO 350 280 PRINT " JUNE ";: GOTO 350 290 PRINT " JULY ";: GOTO 350 300 PRINT " AUGUST ";: GOTO 350 310 PRINT "SEPTEMBER";: GOTO 350 320 PRINT " OCTOBER ";: GOTO 350 330 PRINT " NOVEMBER";: GOTO 350 340 PRINT " DECEMBER"; 350 FOR I=1 TO 18: PRINT "*";: NEXT I 360 PRINT 365-S;"**"; 370 REM 366-S; ON LEAP YEARS 380 PRINT CHR$(10): PRINT " S M T W"; 390 PRINT " T F S" 400 PRINT 410 FOR I=1 TO 59: PRINT "*";: NEXT I 420 REM 430 FOR W=1 TO 6 440 PRINT CHR$(10) 450 PRINT TAB(4) 460 REM 470 FOR G=1 TO 7 480 D=D+1 490 D2=D-S 500 IF D2>M(N) THEN 580 510 IF D2>0 THEN PRINT D2; 520 PRINT TAB(4+8*G); 530 NEXT G 540 REM 550 IF D2=M(N) THEN 590 560 NEXT W 570 REM 580 D=D-G 590 NEXT N 600 REM 610 FOR I=1 TO 6: PRINT CHR$(10);: NEXT I 620 DATA 0,31,28,31,30,31,30,31,31,30,31,30,31 630 REM 0,31,29, ..., ON LEAP YEARS 640 END 2 PRINT TAB(33);"CHANGE" 4 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 5 PRINT:PRINT:PRINT 6 PRINT "I, YOUR FRIENDLY MICROCOMPUTER, WILL DETERMINE" 8 PRINT "THE CORRECT CHANGE FOR ITEMS COSTING UP TO $100." 9 PRINT:PRINT 10 PRINT "COST OF ITEM";:INPUT A:PRINT "AMOUNT OF PAYMENT";:INPUT P 20 C=P-A:M=C:IF C<>0 THEN 90 25 PRINT "CORRECT AMOUNT, THANK YOU." 30 GOTO 400 90 IF C>0 THEN 120 95 PRINT "SORRY, YOU HAVE SHORT-CHANGED ME $";A-P 100 GOTO 10 120 PRINT "YOUR CHANGE, $";C 130 D=INT(C/10) 140 IF D=0 THEN 155 150 PRINT D;"TEN DOLLAR BILL(S)" 155 C=M-(D*10) 160 E=INT(C/5) 170 IF E=0 THEN 185 180 PRINT E;"FIVE DOLLARS BILL(S)" 185 C=M-(D*10+E*5) 190 F=INT(C) 200 IF F=0 THEN 215 210 PRINT F;"ONE DOLLAR BILL(S)" 215 C=M-(D*10+E*5+F) 220 C=C*100 225 N=C 230 G=INT(C/50) 240 IF G=0 THEN 255 250 PRINT G;"ONE HALF DOLLAR(S)" 255 C=N-(G*50) 260 H=INT(C/25) 270 IF H=0 THEN 285 280 PRINT H;"QUARTER(S)" 285 C=N-(G*50+H*25) 290 I=INT(C/10) 300 IF I=0 THEN 315 310 PRINT I;"DIME(S)" 315 C=N-(G*50+H*25+I*10) 320 J=INT(C/5) 330 IF J=0 THEN 345 340 PRINT J;"NICKEL(S)" 345 C=N-(G*50+H*25+I*10+J*5) 350 K=INT(C+.5) 360 IF K=0 THEN 380 370 PRINT K;"PENNY(S)" 380 PRINT "THANK YOU, COME AGAIN." 390 PRINT:PRINT 400 GOTO 10 410 END 5 PRINT TAB(32);"CHECKERS" 10 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 15 PRINT:PRINT:PRINT 20 PRINT "THIS IS THE GAME OF CHECKERS. THE COMPUTER IS X," 25 PRINT "AND YOU ARE O. THE COMPUTER WILL MOVE FIRST." 30 PRINT "SQUARES ARE REFERRED TO BY A COORDINATE SYSTEM." 35 PRINT "(0,0) IS THE LOWER LEFT CORNER" 40 PRINT "(0,7) IS THE UPPER LEFT CORNER" 45 PRINT "(7,0) IS THE LOWER RIGHT CORNER" 50 PRINT "(7,7) IS THE UPPER RIGHT CORNER" 55 PRINT "THE COMPUTER WILL TYPE '+TO' WHEN YOU HAVE ANOTHER" 60 PRINT "JUMP. TYPE TWO NEGATIVE NUMBERS IF YOU CANNOT JUMP." 65 PRINT:PRINT:PRINT 80 DIM R(4),S(7,7):G=-1:R(0)=-99 90 DATA 1,0,1,0,0,0,-1,0,0,1,0,0,0,-1,0,-1,15 120 FOR X=0 TO 7:FOR Y=0 TO 7:READ J:IF J=15 THEN 180 160 S(X,Y)=J:GOTO 200 180 RESTORE:READ S(X,Y) 200 NEXT Y,X 230 FOR X=0 TO 7:FOR Y=0 TO 7:IF S(X,Y)>-1 THEN 350 310 IF S(X,Y)=-1 THEN FOR A=-1 TO 1 STEP 2:B=G:GOSUB 650:NEXT A 330 IF S(X,Y)=-2 THEN FOR A=-1 TO 1 STEP 2:FOR B=-1 TO 1 STEP 2:GOSUB 650:NEXT B,A 350 NEXT Y,X:GOTO 1140 650 U=X+A:V=Y+B:IF U<0 OR U>7 OR V<0 OR V>7 THEN 870 740 IF S(U,V)=0 THEN GOSUB 910:GOTO 870 770 IF S(U,V)<0 THEN 870 790 U=U+A:V=V+B:IF U<0 OR V<0 OR U>7 OR V>7 THEN 870 850 IF S(U,V)=0 THEN GOSUB 910 870 RETURN 910 IF V=0 AND S(X,Y)=-1 THEN Q=Q+2 920 IF ABS(Y-V)=2 THEN Q=Q+5 960 IF Y=7 THEN Q=Q-2 980 IF U=0 OR U=7 THEN Q=Q+1 1030 FOR C=-1 TO 1 STEP 2:IF U+C<0 OR U+C>7 OR V+G<0 THEN 1080 1035 IF S(U+C,V+G)<0 THEN Q=Q+1:GOTO 1080 1040 IF U-C<0 OR U-C>7 OR V-G>7 THEN 1080 1045 IF S(U+C,V+G)>0 AND(S(U-C,V-G)=0 OR(U-C=X AND V-G=Y))THEN Q=Q-2 1080 NEXT C:IF Q>R(0)THEN R(0)=Q:R(1)=X:R(2)=Y:R(3)=U:R(4)=V 1100 Q=0:RETURN 1140 IF R(0)=-99 THEN 1880 1230 PRINT CHR$(30)"FROM"R(1);R(2)"TO"R(3);R(4);:R(0)=-99 1240 IF R(4)=0 THEN S(R(3),R(4))=-2:GOTO 1420 1250 S(R(3),R(4))=S(R(1),R(2)) 1310 S(R(1),R(2))=0:IF ABS(R(1)-R(3))<>2 THEN 1420 1330 S((R(1)+R(3))/2,(R(2)+R(4))/2)=0 1340 X=R(3):Y=R(4):IF S(X,Y)=-1 THEN B=-2:FOR A=-2 TO 2 STEP 4:GOSUB 1370 1350 IF S(X,Y)=-2 THEN FOR A=-2 TO 2 STEP 4:FOR B=-2 TO 2 STEP 4:GOSUB 1370:NEXT B 1360 NEXT A:IF R(0)<>-99 THEN PRINT"TO"R(3);R(4);:R(0)=-99:GOTO 1240 1365 GOTO 1420 1370 U=X+A:V=Y+B:IF U<0 OR U>7 OR V<0 OR V>7 THEN 1400 1380 IF S(U,V)=0 AND S(X+A/2,Y+B/2)>0 THEN GOSUB 910 1400 RETURN 1420 PRINT:PRINT:PRINT:FOR Y=7 TO 0 STEP-1:FOR X=0 TO 7:I=5*X:PRINT TAB(I); 1430 IF S(X,Y)=0 THEN PRINT"."; 1470 IF S(X,Y)=1 THEN PRINT"O"; 1490 IF S(X,Y)=-1 THEN PRINT"X"; 1510 IF S(X,Y)=-2 THEN PRINT"X*"; 1530 IF S(X,Y)=2 THEN PRINT"O*"; 1550 NEXT X:PRINT" ":PRINT:NEXT Y:PRINT 1552 FOR L=0 TO 7 1554 FOR M=0 TO 7 1556 IF S(L,M)=1 OR S(L,M)=2 THEN Z=1 1558 IF S(L,M)=-1 OR S(L,M)=-2 THEN T=1 1560 NEXT M 1562 NEXT L 1564 IF Z<>1 THEN 1885 1566 IF T<>1 THEN 1880 1570 Z=0: T=0 1590 INPUT "FROM";E,H:X=E:Y=H:IF S(X,Y)<=0 THEN 1590 1670 INPUT "TO";A,B:X=A:Y=B 1680 IF S(X,Y)=0 AND ABS(A-E)<=2 AND ABS(A-E)=ABS(B-H)THEN 1700 1690 PRINT CHR$(7)CHR$(11);:GOTO 1670 1700 I=46 1750 S(A,B)=S(E,H):S(E,H)=0:IF ABS(E-A)<>2 THEN 1810 1800 S((E+A)/2,(H+B)/2)=0 1802 INPUT "+TO";A1,B1:IF A1<0 THEN 1810 1804 IF S(A1,B1)<>0 OR ABS(A1-A)<>2 OR ABS(B1-B)<>2 THEN 1802 1806 E=A:H=B:A=A1:B=B1:I=I+15:GOTO 1750 1810 IF B=7 THEN S(A,B)=2 1830 GOTO 230 1880 PRINT: PRINT "YOU WIN.": END 1885 PRINT: PRINT "I WIN.": END 3 PRINT TAB(33);"CHEMIST" 6 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 8 PRINT:PRINT:PRINT 10 PRINT "THE FICTITIOUS CHECMICAL KRYPTOCYANIC ACID CAN ONLY BE" 20 PRINT "DILUTED BY THE RATIO OF 7 PARTS WATER TO 3 PARTS ACID." 30 PRINT "IF ANY OTHER RATIO IS ATTEMPTED, THE ACID BECOMES UNSTABLE" 40 PRINT "AND SOON EXPLODES. GIVEN THE AMOUNT OF ACID, YOU MUST" 50 PRINT "DECIDE WHO MUCH WATER TO ADD FOR DILUTION. IF YOU MISS" 60 PRINT "YOU FACE THE CONSEQUENCES." 100 A=INT(RND(1)*50) 110 W=7*A/3 120 PRINT A;"LITERS OF KRYPTOCYANIC ACID. HOW MUCH WATER"; 130 INPUT R 140 D=ABS(W-R) 150 IF D>W/20 THEN 200 160 PRINT " GOOD JOB! YOU MAY BREATHE NOW, BUT DON'T INHALE THE FUMES!" 170 PRINT 180 GOTO 100 200 PRINT " SIZZLE! YOU HAVE JUST BEEN DESALINATED INTO A BLOB" 210 PRINT " OF QUIVERING PROTOPLASM!" 220 T=T+1 230 IF T=9 THEN 260 240 PRINT " HOWEVER, YOU MAY TRY AGAIN WITH ANOTHER LIFE." 250 GOTO 100 260 PRINT " YOUR 9 LIVES ARE USED, BUT YOU WILL BE LONG REMEMBERED FOR" 270 PRINT " YOUR CONTRIBUTIONS TO THE FIELD OF COMIC BOOK CHEMISTRY." 280 END 2 PRINT TAB(30) "CHIEF" 4 PRINT TAB(15) "CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 6 PRINT:PRINT:PRINT 10 PRINT "I AM CHIEF NUMBERS FREEK, THE GREAT INDIAN MATH GOD." 20 PRINT "ARE YOU READY TO TAKE THE TEST YOU CALLED ME OUT FOR"; 30 INPUT A$ 40 IF A$="YES" THEN 60 50 PRINT "SHUT UP, PALE FACE WITH WISE TONGUE." 60 PRINT " TAKE A NUMBER AND ADD 3. DIVIDE THIS NUMBER BY 5 AND" 70 PRINT "MULTIPLY BY 8. DIVIDE BY 5 AND ADD THE SAME. SUBTRACT 1." 80 PRINT " WHAT DO YOU HAVE"; 90 INPUT B 100 LET C = (B+1-5)*5/8*5-3 110 PRINT "I BET YOUR NUMBER WAS" C". AM I RIGHT"; 120 INPUT D$ 130 IF D$="YES" THEN 500 140 PRINT "WHAT WAS YOUR ORIGINAL NUMBER"; 150 INPUT K 155 LET F=K+3 160 LET G=F/5 170 LET H=G*8 180 LET I=H/5+5 190 LET J=I-1 200 PRINT "SO YOU THINK YOU'RE SO SMART, EH?" 210 PRINT "NOW WATCH." 230 PRINT K"PLUS 3 EQUALS"F". THIS DIVIDED BY 5 EQUALS"G";" 240 PRINT "THIS TIMES 8 EQUALS"H". IF WE DIVIDE BY 5 AND ADD 5," 250 PRINT "WE GET"I", WHICH, MINUS 1, EQUALS"J"." 260 PRINT "NOW DO YOU BELIEVE ME"; 270 INPUT Z$ 290 IF Z$="YES" THEN 500 295 PRINT "YOU HAVE MADE ME MAD!!!" 300 PRINT "THERE MUST BE A GREAT LIGHTNING BOLT!" 310 PRINT:PRINT 330 FOR X=30 TO 22 STEP -1 340 PRINT TAB(X) "X X" 350 NEXT X 360 PRINT TAB(21) "X XXX" 370 PRINT TAB(20) "X X" 380 PRINT TAB(19) "XX X" 390 FOR Y=20 TO 13 STEP -1 400 PRINT TAB(Y) "X X" 410 NEXT Y 420 PRINT TAB(12) "XX" 430 PRINT TAB(11) "X" 440 PRINT TAB(10) "*" 450 PRINT:PRINT"#########################":PRINT 470 PRINT "I HOPE YOU BELIEVE ME NOW, FOR YOUR SAKE!!" 480 GOTO 520 510 PRINT "BYE!!!" 520 END 10 PRINT TAB(33);"CHOMP" 20 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 30 PRINT:PRINT:PRINT 40 DIM A(10,10) 100 REM *** THE GAME OF CHOMP *** COPYRIGHT PCC 1973 *** 110 PRINT 120 PRINT "THIS IS THE GAME OF CHOMP (SCIENTIFIC AMERICAN, JAN 1973)" 130 PRINT "DO YOU WANT THE RULES (1=YES, 0=NO!)"; 140 INPUT R 150 IF R=0 THEN 340 160 F=1 170 R=5 180 C=7 190 PRINT "CHOMP IS FOR 1 OR MORE PLAYERS (HUMANS ONLY)." 200 PRINT 210 PRINT "HERE'S HOW A BOARD LOOKS (THIS ONE IS 5 BY 7):" 220 GOSUB 540 230 PRINT 240 PRINT "THE BOARD IS A BIG COOKIE - R ROWS HIGH AND C COLUMNS" 250 PRINT "WIDE. YOU INPUT R AND C AT THE START. IN THE UPPER LEFT" 260 PRINT "CORNER OF THE COOKIE IS A POISON SQUARE (P). THE ONE WHO" 270 PRINT "CHOMPS THE POISON SQUARE LOSES. TO TAKE A CHOMP, TYPE THE" 280 PRINT "ROW AND COLUMN OF ONE OF THE SQUARES ON THE COOKIE." 290 PRINT "ALL OF THE SQUARES BELOW AND TO THE RIGHT OF THAT SQUARE" 300 PRINT "(INCLUDING THAT SQUARE, TOO) DISAPPEAR -- CHOMP!!" 310 PRINT "NO FAIR CHOMPING SQUARES THAT HAVE ALREADY BEEN CHOMPED," 320 PRINT "OR THAT ARE OUTSIDE THE ORIGINAL DIMENSIONS OF THE COOKIE." 330 PRINT 340 PRINT "HERE WE GO..." 350 REM 360 F=0 370 FOR I=1 TO 10 372 FOR J=1 TO 10 375 A(I,J)=0 377 NEXT J 379 NEXT I 380 PRINT 390 PRINT "HOW MANY PLAYERS"; 400 INPUT P 410 I1=0 420 PRINT "HOW MANY ROWS"; 430 INPUT R 440 IF R <= 9 THEN 470 450 PRINT "TOO MANY ROWS (9 IS MAXIMUM). NOW, "; 460 GOTO 420 470 PRINT "HOW MANY COLUMNS"; 480 INPUT C 490 IF C <= 9 THEN 530 500 PRINT "TOO MANY COLUMNS (9 IS MAXIMUM). NOW, "; 510 GOTO 470 530 PRINT 540 FOR I=1 TO R 550 FOR J=1 TO C 560 A(I,J)=1 570 NEXT J 580 NEXT I 590 A(1,1)=-1 600 REM PRINT THE BOARD 610 PRINT 620 PRINT TAB(7);"1 2 3 4 5 6 7 8 9" 630 FOR I=1 TO R 640 PRINT I;TAB(7); 650 FOR J=1 TO C 660 IF A(I,J)=-1 THEN 700 670 IF A(I,J)=0 THEN 720 680 PRINT "* "; 690 GOTO 710 700 PRINT "P "; 710 NEXT J 720 PRINT 730 NEXT I 740 PRINT 750 IF F=0 THEN 770 760 RETURN 770 REM GET CHOMPS FOR EACH PLAYER IN TURN 780 LET I1=I1+1 790 LET P1=I1-INT(I1/P)*P 800 IF P1 <> 0 THEN 820 810 P1=P 820 PRINT "PLAYER";P1 830 PRINT "COORDINATES OF CHOMP (ROW,COLUMN)"; 840 INPUT R1,C1 850 IF R1<1 THEN 920 860 IF R1>R THEN 920 870 IF C1<1 THEN 920 880 IF C1>C THEN 920 890 IF A(R1,C1)=0 THEN 920 900 IF A(R1,C1)=-1 THEN 1010 910 GOTO 940 920 PRINT "NO FAIR. YOU'RE TRYING TO CHOMP ON EMPTY SPACE!" 930 GOTO 820 940 FOR I=R1 TO R 950 FOR J=C1 TO C 960 A(I,J)=0 970 NEXT J 980 NEXT I 990 GOTO 610 1000 REM END OF GAME DETECTED IN LINE 900 1010 PRINT "YOU LOSE, PLAYER";P1 1020 PRINT 1030 PRINT "AGAIN (1=YES, 0=NO!)"; 1040 INPUT R$ 1050 IF R=1 THEN 340 1060 END 2 PRINT TAB(26) "CIVIL WAR" 4 PRINT TAB(15) "CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 6 PRINT : PRINT : PRINT 20 REM ORIGINAL GAME DESIGN: CRAM, GOODIE, HIBBARD LEXINGTON H.S. 30 REM MODIFICATIONS: G. PAUL, R. HESS (TIES), 1973 50 DIM S(4),C$(14),M1(14),M2(14),C1(14),C2(14),M(14) 60 REM UNION INFO ON LIKELY CONFEDERATE STRATEGY 70 S(1)=25 : S(2)=25 : S(3)=25 : S(4)=25 82 REM READ HISTORICAL DATA. 84 FOR D=1 TO 14 86 READ C$(D),M1(D),M2(D),C1(D),C2(D),M(D) 88 NEXT D 89 LET D=RND(-1) 90 PRINT 100 PRINT "DO YOU WANT INSTRUCTIONS"; 110 INPUT X$ 120 IF X$="YES" THEN 160 130 IF X$="NO" THEN 370 140 PRINT "YES OR NO -- "; 150 GOTO 110 160 PRINT : PRINT : PRINT : PRINT 170 PRINT "THIS IS A CIVIL WAR SIMULATION." 180 PRINT "TO PLAY TYPE A RESPONSE WHEN THE COMPUTER ASKS." 190 PRINT "REMEMBER THAT ALL FACTORS ARE INTERRELATED AND THAT YOUR" 200 PRINT "RESPONSES COULD CHANGE HISTORY. FACTS AND FIGURES USED ARE" 210 PRINT "BASED ON THE ACTUAL OCCURRENCE. MOST BATTLES TEND TO RESULT" 220 PRINT "AS THEY DID IN THE CIVIL WAR, BUT IT ALL DEPENDS ON YOU!!" 230 PRINT 240 PRINT "THE OBJECT OF THE GAME IS TO WIN AS MANY BATTLES AS "; 245 PRINT "POSSIBLE." 250 PRINT 260 PRINT "YOUR CHOICES FOR DEFENSIVE STRATEGY ARE:" 270 PRINT " (1) ARTILLERY ATTACK" 280 PRINT " (2) FORTIFICATION AGAINST FRONTAL ATTACK" 290 PRINT " (3) FORTIFICATION AGAINST FLANKING MANEUVERS" 300 PRINT " (4) FALLING BACK" 310 PRINT " YOUR CHOICES FOR OFFENSIVE STRATEGY ARE:" 320 PRINT " (1) ARTILLERY ATTACK" 330 PRINT " (2) FRONTAL ATTACK" 340 PRINT " (3) FLANKING MANEUVERS" 350 PRINT " (4) ENCIRCLEMENT" 360 PRINT "YOU MAY SURRENDER BY TYPING A '5' FOR YOUR STRATEGY." 370 PRINT : PRINT : PRINT : PRINT "ARE THERE TWO GENERALS PRESENT "; 380 PRINT "(ANSWER YES OR NO)"; 390 INPUT B$ 400 IF B$="YES" THEN 430 410 IF B$ <> "NO" THEN 380 420 PRINT : PRINT "YOU ARE THE CONFEDERACY. GOOD LUCK!" 425 PRINT 430 LET D=1 440 IF B$ <> "YES" THEN 460 450 LET D=2 460 PRINT "SELECT A BATTLE BY TYPING A NUMBER FROM 1 TO 14 ON" 470 PRINT "REQUEST. TYPE ANY OTHER NUMBER TO END THE SIMULATION." 480 PRINT "BUT '0' BRINGS BACK EXACT PREVIOUS BATTLE SITUATION" 490 PRINT "ALLOWING YOU TO REPLAY IT" 500 PRINT 510 PRINT "NOTE: A NEGATIVE FOOD$ ENTRY CAUSES THE PROGRAM TO " 520 PRINT "USE THE ENTRIES FROM THE PREVIOUS BATTLE" 530 PRINT 540 PRINT "AFTER REQUESTING A BATTLE, DO YOU WISH "; 550 PRINT "BATTLE DESCRIPTIONS "; 560 PRINT "(ANSWER YES OR NO)"; 570 INPUT X$ 580 IF X$="YES" THEN 600 590 IF X$ <> "NO" THEN 560 600 L=0:W=0:R1=0:Q1=0:M3=0:M4=0:P1=0:P2=0:T1=0:T2=0 610 F(2)=0:H(2)=0:B(2)=0:R2=0:Q2=0:C6=0:F=0:W0=0:Y=0:Y2=0:U=0:U2=0 620 PRINT : PRINT : PRINT 630 PRINT "WHICH BATTLE DO YOU WISH TO SIMULATE"; 640 INPUT A 650 IF A <> 0 THEN 660 655 IF R <> 0 THEN 1140 660 IF A <=0 THEN 2860 665 IF A >= 15 THEN 2860 670 LET C$=C$(A) 680 LET M1=M1(A) 690 LET M2=M2(A) 700 LET C1=C1(A) 710 LET C2=C2(A) 720 LET M=M(A) 960 LET U=0 970 REM INFLATION CALC 980 LET I1=10+(L-W)*2 990 LET I2=10+(W-L)*2 1000 REM - MONEY AVAILABLE 1010 LET D(1)=100*INT((M1*(100-I1)/2000)*(1+(R1-Q1)/(R1+1))+.5) 1020 LET D(2)=100*INT(M2*(100-I2)/2000+.5) 1030 IF B$ <> "YES" THEN 1050 1040 LET D(2)=100*INT((M2*(100-I2)/2000)*(1+(R2-Q2)/(R2+1))+.5) 1050 REM - MEN AVAILABLE 1060 LET M5=INT(M1*(1+(P1-T1)/(M3+1))) 1070 LET M6=INT(M2*(1+(P2-T2)/(M4+1))) 1080 LET F1=5*M1/6 1090 PRINT : PRINT : PRINT : PRINT : PRINT 1100 PRINT "THIS IS THE BATTLE OF ";C$ 1110 IF X$="NO" THEN 1150 1120 IF A>11 THEN 1130 1125 ON A GOTO 3580,3620,3650,3690,3720,3750,3780,3800,3830,3860,3890 1130 ON A-11 GOTO 3920,3950,3980 1140 PRINT C$" INSTANT REPLAY" 1150 PRINT 1160 PRINT " ","CONFEDERACY"," UNION" 1170 PRINT "MEN"," "M5," "M6 1180 PRINT "MONEY","$";D(1),"$";D(2) 1190 PRINT "INFLATION"," ";I1+15;"%"," ";I2;"%" 1195 PRINT 1200 REM - ONLY IN PRINTOUT IS CONFED INFLATION = I1+15% 1210 REM - IF TWO GENERALS, INPUT CONFED. FIRST 1220 FOR I=1 TO D 1230 IF B$ <> "YES" THEN 1260 1240 IF I=2 THEN 1260 1250 PRINT "CONFEDERATE GENERAL---"; 1260 PRINT "HOW MUCH DO YOU WISH TO SPEND FOR" 1270 PRINT " - FOOD......"; 1280 INPUT F 1290 IF F >= 0 THEN 1360 1300 IF R1 <> 0 THEN 1330 1310 PRINT "NO PREVIOUS ENTRIES" 1320 GOTO 1270 1330 PRINT "ASSUME YOU WANT TO KEEP SAME ALLOCATIONS" 1340 PRINT 1350 GOTO 1510 1360 LET F(I)=F 1370 PRINT " - SALARIES.."; 1380 INPUT H(I) 1390 LET N=1 1400 IF H(I)<0 THEN 1490 1410 PRINT " - AMMUNITION"; 1420 INPUT B(I) 1430 LET N=2 1440 IF B(I)<0 THEN 1490 1450 PRINT 1460 IF F(I)+H(I)+B(I) <= D(I) THEN 1510 1470 PRINT "THINK AGAIN! YOU HAVE ONLY $"D(I) 1480 GOTO 1270 1490 PRINT "NEGATIVE VALUES NOT ALLOWED." 1500 ON N GOTO 1370,1410 1510 IF B$ <> "YES" THEN 1550 1520 IF I=2 THEN 1550 1530 PRINT "UNION GENERAL---"; 1540 NEXT I 1550 FOR Z=1 TO D 1560 IF B$ <> "YES" THEN 1620 1570 ON Z GOTO 1580,1600 1580 PRINT "CONFEDERATE "; 1590 GOTO 1620 1600 PRINT " UNION "; 1610 REM - FIND MORALE 1620 LET O=((2*F(Z)^2+H(Z)^2)/F1^2+1) 1630 IF O<10 THEN 1660 1640 PRINT "MORALE IS HIGH" 1650 GOTO 1700 1660 IF O<5 THEN 1690 1670 PRINT "MORALE IS FAIR" 1680 GOTO 1700 1690 PRINT "MORALE IS POOR" 1700 IF B$ <> "YES" THEN 1760 1710 LET O(Z)=O 1720 NEXT Z 1730 LET O2=O(2) 1740 LET O=O(1) 1750 PRINT "CONFEDERATE GENERAL---"; 1760 REM - ACTUAL OFF/DEF BATTLE SITUATION 1770 IF M <> 3 THEN 1800 1780 PRINT "YOU ARE ON THE OFFENSIVE" 1790 GOTO 1840 1800 IF M <> 1 THEN 1830 1810 PRINT "YOU ARE ON THE DEFENSIVE" 1820 GOTO 1840 1830 PRINT "BOTH SIDES ARE ON THE OFFENSIVE " 1840 PRINT 1850 REM - CHOOSE STRATEGIES 1860 IF B$ <> "YES" THEN 1910 1870 FOR I=1 TO 2 1880 ON I GOTO 1890,1920 1890 PRINT "CONFEDERATE STRATEGY "; 1900 GOTO 1920 1910 PRINT "YOUR STRATEGY "; 1920 INPUT Y 1930 IF ABS(Y-3)<3 THEN 1960 1940 PRINT "STRATEGY";Y;"NOT ALLOWED." 1950 GOTO 1910 1960 IF B$="YES" THEN 2000 1970 IF Y=5 THEN 2830 1980 GOSUB 3110 1990 GOTO 2170 2000 IF I=2 THEN 2040 2010 LET Y1=Y 2020 PRINT "UNION STRATEGY "; 2030 NEXT I 2040 LET Y2=Y 2050 LET Y=Y1 2060 IF Y2=5 THEN 2020 2070 REM : SIMULATED LOSSES-NORTH 2080 LET C6=(2*C2/5)*(1+1/(2*(ABS(Y2-Y)+1))) 2090 LET C6=C6*(1.28+(5*M2/6)/(B(2)+1)) 2100 LET C6=INT(C6*(1+1/O2)+.5) 2110 REM - IF LOSS > MEN PRESENT, RESCALE LOSSES 2120 LET E2=100/O2 2130 IF INT(C6+E2)<M6 THEN 2190 2140 LET C6=INT(13*M6/20) 2150 LET E2=7*C6/13 2160 LET U2=1 2170 REM - CALCULATE SIMULATED LOSSES 2180 PRINT 2190 PRINT : PRINT : PRINT ,"CONFEDERACY","UNION" 2200 LET C5=(2*C1/5)*(1+1/(2*(ABS(Y2-Y)+1))) 2210 LET C5=INT(C5*(1+1/O)*(1.28+F1/(B(1)+1))+.5) 2220 LET E=100/O 2230 IF C5+100/O<M1*(1+(P1-T1)/(M3+1)) THEN 2270 2240 LET C5=INT(13*M1/20*(1+(P1-T1)/(M3+1))) 2250 LET E=7*C5/13 2260 LET U=1 2270 IF D=1 THEN 2500 2280 PRINT "CASUALTIES",C5,C6 2290 PRINT "DESERTIONS",INT(E),INT(E2) 2300 PRINT 2310 IF B$ <> "YES" THEN 2350 2320 PRINT "COMPARED TO THE ACTUAL CASUALTIES AT "C$ 2330 PRINT "CONFEDERATE:"INT(100*(C5/C1)+.5)"% OF THE ORIGINAL" 2340 PRINT "UNION: "INT(100*(C6/C2)+.5)"% OF THE ORIGINAL" 2350 PRINT 2360 REM - 1 WHO ONE 2370 IF U <> 1 THEN 2380 2375 IF U2=1 THEN 2460 2380 IF U=1 THEN 2420 2390 IF U2=1 THEN 2440 2400 IF C5+E=C6+E2 THEN 2460 2410 IF C5+E<C6+E2 THEN 2440 2420 PRINT "THE UNION WINS "C$ 2430 GOTO 2600 2440 PRINT "THE CONFEDERACY WINS "C$ 2450 GOTO 2660 2460 PRINT "BATTLE OUTCOME UNRESOLVED" 2470 LET W0=W0+1 2480 IF A=0 THEN 2790 2490 GOTO 2680 2500 LET C6=INT(17*C2*C1/(C5*20)) 2510 LET E2=5*O 2520 GOTO 2280 2530 PRINT "YOUR CASUALTIES WERE "INT(100*(C5/C1)+.5)"% OF " 2540 PRINT "THE ACTUAL CASUALTIES AT ";C$ 2550 PRINT 2560 REM - FIND WHO WON 2570 IF U=1 THEN 2590 2580 IF C5+E<17*C2*C1/(C5*20)+5*O THEN 2630 2590 PRINT "YOU LOSE ";C$ 2600 IF A=0 THEN 2790 2610 LET L=L+1 2620 GOTO 2680 2630 PRINT "YOU WIN ";C$ 2640 REM - CUMULATIVE BATTLE FACTORS WHICH ALTER HISTORICAL 2650 REM RESOURCES AVAILABLE.IF A REPLAY DON'T UPDATE. 2660 IF A=0 THEN 2790 2670 LET W=W+1 2680 LET T1=T1+C5+E 2690 LET T2=T2+C6+E2 2700 LET P1=P1+C1 2710 LET P2=P2+C2 2720 LET Q1=Q1+(F(1)+H(1)+B(1)) 2730 LET Q2=Q2+(F(2)+H(2)+B(2)) 2740 LET R1=R1+M1*(100-I1)/20 2750 LET R2=R2+M2*(100-I2)/20 2760 LET M3=M3+M1 2770 LET M4=M4+M2 2780 GOSUB 3300 2790 U=0:U2=0 2800 PRINT "---------------" 2810 GOTO 620 2820 REM------FINISH OFF 2830 PRINT "THE CONFEDERACY HAS SURRENDERED" 2840 GOTO 2860 2850 PRINT "THE UNION HAS SURRENDERED." 2860 PRINT : PRINT : PRINT : PRINT : PRINT : PRINT 2870 PRINT "THE CONFEDERACY "; 2880 PRINT "HAS WON "W" BATTLES AND LOST "L 2890 IF Y=5 THEN 2940 2900 IF Y2=5 THEN 2920 2910 IF W <= L THEN 2940 2915 IF Y=5 THEN 2940 2920 PRINT "THE CONFEDERACY HAS WON THE WAR" 2930 GOTO 2950 2940 PRINT "THE UNION HAS WON THE WAR" 2950 PRINT 2960 IF R1=0 THEN 3100 2970 PRINT "FOR THE "W+L+W0" BATTLES FOUGHT (EXCUDING RERUNS)" 2980 PRINT " "," "," "; 2990 PRINT "CONFEDERACY"," UNION" 3000 PRINT "HISTORICAL LOSSES",INT(P1+.5),INT(P2+.5) 3010 PRINT "SIMULATED LOSSES",INT(T1+.5),INT(T2+.5) 3020 PRINT 3030 PRINT " % OF ORIGINAL",INT(100*(T1/P1)+.5),INT(100*(T2/P2)+.5) 3040 IF B$="YES" THEN 3100 3050 PRINT 3060 PRINT "UNION INTELLIGENCE SUGGESTS THAT THE SOUTH USED " 3070 PRINT "STRATEGIES 1, 2, 3, 4 IN THE FOLLOWING PERCENTAGES" 3080 PRINT S(1);S2(2);S(3);S(4) 3090 REM--------------------------------- 3100 STOP 3110 REM - UNION STRATEGY IS COMPUTER CHOSEN 3120 PRINT "UNION STRATEGY IS "; 3130 IF A <> 0 THEN 3180 3140 INPUT Y2 3150 IF Y2 <=0 THEN 3160 3155 IF Y2<5 THEN 3290 3160 PRINT "ENTER 1 , 2 ,3 , OR 4 (USUALLY PREVIOUS UNION STRATEGY)" 3170 GOTO 3140 3180 LET S0=0 3190 LET R=100*RND(0) 3200 FOR I=1 TO 4 3210 LET S0=S0+S(I) 3220 REM - IF ACTUAL STRATEGY INFO IS IN PROGRAM DATA STATEMENTS 3230 REM THEN R-100 IS EXTRA WEIGHT GIVEN TO THAT STATEGY. 3240 IF R<S0 THEN 3270 3250 NEXT I 3260 REM - IF ACTUAL STRAT. IN,THEN HERE IS Y2= HIST. STRAT. 3270 LET Y2=I 3280 PRINT Y2 3290 RETURN 3300 REM LEARN PRESENT STRATEGY, START FORGETTING OLD ONES 3310 REM - PRESENT STRATEGY OF SOUTH GAINS 3*S, OTHERS LOSE S 3320 REM PROBABILITY POINTS, UNLESS A STRATEGY FALLS BELOW 5%. 3330 LET S=3 3340 LET S0=0 3350 FOR I=1 TO 4 3360 IF S(I) <= 5 THEN 3390 3370 LET S(I)=S(I)-S 3380 LET S0=S0+S 3390 NEXT I 3400 LET S(Y)=S(Y)+S0 3410 RETURN 3420 REM - HISTORICAL DATA...CAN ADD MORE (STRAT.,ETC) BY INSERTING 3430 REM DATA STATEMENTS AFTER APPRO. INFO, AND ADJUSTING READ 3440 DATA "BULL RUN",18000,18500,1967,2708,1 3450 DATA "SHILOH",40000.,44894.,10699,13047,3 3460 DATA "SEVEN DAYS",95000.,115000.,20614,15849,3 3470 DATA "SECOND BULL RUN",54000.,63000.,10000,14000,2 3480 DATA "ANTIETAM",40000.,50000.,10000,12000,3 3490 DATA "FREDERICKSBURG",75000.,120000.,5377,12653,1 3500 DATA "MURFREESBORO",38000.,45000.,11000,12000,1 3510 DATA "CHANCELLORSVILLE",32000,90000.,13000,17197,2 3520 DATA "VICKSBURG",50000.,70000.,12000,19000,1 3530 DATA "GETTYSBURG",72500.,85000.,20000,23000,3 3540 DATA "CHICKAMAUGA",66000.,60000.,18000,16000,2 3550 DATA "CHATTANOOGA",37000.,60000.,36700.,5800,2 3560 DATA "SPOTSYLVANIA",62000.,110000.,17723,18000,2 3570 DATA "ATLANTA",65000.,100000.,8500,3700,1 3580 PRINT "JULY 21, 1861. GEN. BEAUREGARD, COMMANDING THE SOUTH, MET" 3590 PRINT "UNION FORCES WITH GEN. MCDOWELL IN A PREMATURE BATTLE AT" 3600 PRINT "BULL RUN. GEN. JACKSON HELPED PUSH BACK THE UNION ATTACK." 3610 GOTO 1150 3620 PRINT "APRIL 6-7, 1862. THE CONFEDERATE SURPRISE ATTACK AT" 3630 PRINT "SHILOH FAILED DUE TO POOR ORGANIZATION." 3640 GOTO 1150 3650 PRINT "JUNE 25-JULY 1, 1862. GENERAL LEE (CSA) UPHELD THE" 3660 PRINT "OFFENSIVE THROUGHOUT THE BATTLE AND FORCED GEN. MCCLELLAN" 3670 PRINT "AND THE UNION FORCES AWAY FROM RICHMOND." 3680 GOTO 1150 3690 PRINT "AUG 29-30, 1862. THE COMBINED CONFEDERATE FORCES UNDER"; 3695 PRINT " LEE" 3700 PRINT "AND JACKSON DROVE THE UNION FORCES BACK INTO WASHINGTON." 3710 GOTO 1150 3720 PRINT "SEPT 17, 1862. THE SOUTH FAILED TO INCORPORATE MARYLAND" 3730 PRINT "INTO THE CONFEDERACY." 3740 GOTO 1150 3750 PRINT "DEC 13, 1862. THE CONFEDERACY UNDER LEE SUCCESSFULLY" 3760 PRINT "REPULSED AN ATTACK BY THE UNION UNDER GEN. BURNSIDE." 3770 GOTO 1150 3780 PRINT "DEC 31, 1862. THE SOUTH UNDER GEN. BRAGG WON A CLOSE "; 3785 PRINT "BATTLE." 3790 GOTO 1150 3800 PRINT "MAY 1-6, 1863. THE SOUTH HAD A COSTLY VICTORY AND LOST" 3810 PRINT "ONE OF THEIR OUTSTANDING GENERALS, 'STONEWALL' JACKSON." 3820 GOTO 1150 3830 PRINT "JULY 4, 1863. VICKSBURG WAS A COSTLY DEFEAT FOR THE SOUTH" 3840 PRINT "BECAUSE IT GAVE THE UNION ACCESS TO THE MISSISSIPPI." 3850 GOTO 1150 3860 PRINT "JULY 1-3, 1863. A SOUTHERN MISTAKE BY GEN. LEE AT "; 3865 PRINT "GETTYSBURG" 3870 PRINT "COST THEM ONE OF THE MOST CRUCIAL BATTLES OF THE WAR." 3880 GOTO 1150 3890 PRINT "SEPT. 15, 1863. CONFUSION IN A FOREST NEAR CHICKAMAUGA LED" 3900 PRINT "TO A COSTLY SOUTHERN VICTORY." 3910 GOTO 1150 3920 PRINT "NOV. 25, 1863. AFTER THE SOUTH HAD SIEGED GEN. ROSENCRANS'" 3930 PRINT "ARMY FOR THREE MONTHS, GEN. GRANT BROKE THE SIEGE." 3940 GOTO 1150 3950 PRINT "MAY 5, 1864. GRANT'S PLAN TO KEEP LEE ISOLATED BEGAN TO" 3960 PRINT "FAIL HERE, AND CONTINUED AT COLD HARBOR AND PETERSBURG." 3970 GOTO 1150 3980 PRINT "AUGUST, 1864. SHERMAN AND THREE VETERAN ARMIES CONVERGED" 3990 PRINT "ON ATLANTA AND DEALT THE DEATH BLOW TO THE CONFEDERACY." 4000 GOTO 1150 4010 END 1 PRINT TAB(33);"COMBAT" 2 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 3 PRINT: PRINT: PRINT 4 PRINT "I AM AT WAR WITH YOU.": PRINT "WE HAVE 72000 SOLDIERS APIECE." 5 PRINT:PRINT "DISTRIBUTE YOUR FORCES." 6 PRINT ,"ME"," YOU" 7 PRINT "ARMY",30000, 8 INPUT A 9 PRINT "NAVY",20000, 10 INPUT B 11 PRINT "A. F.",22000, 12 INPUT C 13 IF A+B+C>72000 THEN 5 14 D=30000 15 E=20000 16 F=22000 17 PRINT "YOU ATTACK FIRST. TYPE (1) FOR ARMY; (2) FOR NAVY;" 18 PRINT "AND (3) FOR AIR FORCE." 19 INPUT Y 20 PRINT "HOW MANY MEN" 21 INPUT X 22 IF X<0 THEN 20 23 ON Y GOTO 100,200,300 100 IF X>A THEN 20 105 IF X<A/3 THEN 120 110 IF X<2*A/3 THEN 150 115 GOTO 270 120 PRINT "YOU LOST";X;"MEN FROM YOUR ARMY." 125 A=INT(A-X) 130 GOTO 500 150 PRINT "YOU LOST";INT(X/3);"MEN, BUT I LOST ";INT(2*D/3) 155 A=INT(A-X/3) 160 D=0 165 GOTO 500 200 IF X>B THEN 20 210 IF X<E/3 THEN 230 215 IF X<2*E/3 THEN 250 220 GOTO 270 230 PRINT "YOUR ATTACK WAS STOPPED!" 232 B=INT(B-X) 235 GOTO 500 250 PRINT "YOU DESTROYED";INT(2*E/3);"OF MY ARMY." 255 E=INT(E/3) 260 GOTO 500 270 PRINT "YOU SUNK ONE OF MY PATROL BOATS, BUT I WIPED OUT TWO" 275 PRINT "OF YOUR AIR FORCE BASES AND 3 ARMY BASES." 280 A=INT(A/3) 285 C=INT(C/3) 290 E=INT(2*E/3) 293 GOTO 500 300 IF X>C THEN 20 310 IF X<C/3 THEN 350 320 IF X<2*C/3 THEN 370 330 GOTO 380 350 PRINT "YOUR ATTACK WAS WIPED OUT." 355 C=INT(C-X) 360 GOTO 500 370 PRINT "WE HAD A DOGFIGHT. YOU WON - AND FINISHED YOUR MISSION." 375 D=INT(2*D/3) 377 E=INT(E/3) 378 F=INT(F/3) 379 GOTO 500 380 PRINT "YOU WIPED OUT ONE OF MY ARMY PATROLS, BUT I DESTROYED" 381 PRINT "TWO NAVY BASES AND BOMBED THREE ARMY BASES." 385 A=INT(A/4) 387 B=INT(B/3) 390 D=INT(2*D/3) 500 PRINT 501 PRINT,"YOU","ME" 510 PRINT "ARMY",A,D 520 PRINT "NAVY",B,E 530 PRINT "A. F.",C,F 1000 PRINT "WHAT IS YOUR NEXT MOVE?" 1010 PRINT "ARMY=1 NAVY=2 AIR FORCE=3" 1020 INPUT G 1030 PRINT "HOW MANY MEN" 1040 INPUT T 1045 IF T<0 THEN 1030 1050 ON G GOTO 1600,1700,1800 1600 IF T>A THEN 1030 1610 IF T<D/2 THEN 1630 1615 PRINT "YOU DESTROYED MY ARMY!" 1616 D=0 1617 GOTO 2000 1630 PRINT "I WIPED OUT YOUR ATTACK!" 1635 A=A-T 1640 GOTO 2000 1700 IF T>B THEN 1030 1710 IF T<E/2 THEN 1750 1720 GOTO 1770 1750 PRINT "I SUNK TWO OF YOUR BATTLESHIPS, AND MY AIR FORCE" 1751 PRINT "WIPED OUT YOUR UNGAURDED CAPITOL." 1755 A=A/4 1760 B=B/2 1765 GOTO 2000 1770 PRINT "YOUR NAVY SHOT DOWN THREE OF MY XIII PLANES," 1771 PRINT "AND SUNK THREE BATTLESHIPS." 1775 F=2*F/3 1780 E=(E/2) 1790 GOTO 2000 1800 IF T>C THEN 1030 1810 IF T>F/2 THEN 1830 1820 GOTO 1850 1830 PRINT "MY NAVY AND AIR FORCE IN A COMBINED ATTACK LEFT" 1831 PRINT "YOUR COUNTRY IN SHAMBLES." 1835 A=A/3 1837 B=B/3 1840 C=C/3 1845 GOTO 2000 1850 PRINT "ONE OF YOUR PLANES CRASHED INTO MY HOUSE. I AM DEAD." 1851 PRINT "MY COUNTRY FELL APART." 1860 GOTO 2010 2000 PRINT 2001 PRINT "FROM THE RESULTS OF BOTH OF YOUR ATTACKS," 2002 IF A+B+C>3/2*(D+E+F) THEN 2010 2005 IF A+B+C<2/3*(D+E+F) THEN 2015 2006 PRINT "THE TREATY OF PARIS CONCLUDED THAT WE TAKE OUR" 2007 PRINT "RESPECTIVE COUNTRIES AND LIVE IN PEACE." 2008 GOTO 2020 2010 PRINT "YOU WON, OH! SHUCKS!!!!" 2012 GOTO 2020 2015 PRINT "YOU LOST-I CONQUERED YOUR COUNTRY. IT SERVES YOU" 2016 PRINT "RIGHT FOR PLAYING THIS STUPID GAME!!!" 2020 END 5 PRINT TAB(33);"CRAPS" 10 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 12 PRINT:PRINT:PRINT 15 LET R=0 20 PRINT"2,3,12 ARE LOSERS; 4,5,6,8,9,10 ARE POINTS; 7,11 ARE NATURAL WINNERS." 21 LET T=1 22 PRINT "PICK A NUMBER AND INPUT TO ROLL DICE"; 23 INPUT Z 24 LET X=(RND(0)) 25 LET T =T+1 26 IF T<=Z THEN 24 27 PRINT"INPUT THE AMOUNT OF YOUR WAGER."; 28 INPUT F 30 PRINT "I WILL NOW THROW THE DICE" 40 LET E=INT(7*RND(1)) 41 LET S=INT(7*RND(1)) 42 LET X=E+S 50 IF X=7 THEN 180 55 IF X=11 THEN 180 60 IF X=1 THEN 40 62 IF X=2 THEN 195 65 IF X=0 THEN 40 70 IF X=2 THEN 200 80 IF X=3 THEN 200 90 IF X=12 THEN 200 125 IF X=5 THEN 220 130 IF X =6 THEN 220 140 IF X=8 THEN 220 150 IF X=9 THEN 220 160 IF X =10 THEN 220 170 IF X=4 THEN 220 180 PRINT X "- NATURAL....A WINNER!!!!" 185 PRINT X"PAYS EVEN MONEY, YOU WIN"F"DOLLARS" 190 GOTO 210 195 PRINT X"- SNAKE EYES....YOU LOSE." 196 PRINT "YOU LOSE"F "DOLLARS." 197 LET F=0-F 198 GOTO 210 200 PRINT X " - CRAPS...YOU LOSE." 205 PRINT "YOU LOSE"F"DOLLARS." 206 LET F=0-F 210 LET R= R+F 211 GOTO 320 220 PRINT X "IS THE POINT. I WILL ROLL AGAIN" 230 LET H=INT(7*RND(1)) 231 LET Q=INT(7*RND(1)) 232 LET O=H+Q 240 IF O=1 THEN 230 250 IF O=7 THEN 290 255 IF O=0 THEN 230 260 IF O=X THEN 310 270 PRINT O " - NO POINT. I WILL ROLL AGAIN" 280 GOTO 230 290 PRINT O "- CRAPS. YOU LOSE." 291 PRINT "YOU LOSE $"F 292 F=0-F 293 GOTO 210 300 GOTO 320 310 PRINT X"- A WINNER.........CONGRATS!!!!!!!!" 311 PRINT X "AT 2 TO 1 ODDS PAYS YOU...LET ME SEE..."2*F"DOLLARS" 312 LET F=2*F 313 GOTO 210 320 PRINT " IF YOU WANT TO PLAY AGAIN PRINT 5 IF NOT PRINT 2"; 330 INPUT M 331 IF R<0 THEN 334 332 IF R>0 THEN 336 333 IF R=0 THEN 338 334 PRINT "YOU ARE NOW UNDER $";-R 335 GOTO 340 336 PRINT "YOU ARE NOW AHEAD $";R 337 GOTO 340 338 PRINT "YOU ARE NOW EVEN AT 0" 340 IF M=5 THEN 27 341 IF R<0 THEN 350 342 IF R>0 THEN 353 343 IF R=0 THEN 355 350 PRINT"TOO BAD, YOU ARE IN THE HOLE. COME AGAIN." 351 GOTO 360 353 PRINT"CONGRATULATIONS---YOU CAME OUT A WINNER. COME AGAIN!" 354 GOTO 360 355 PRINT"CONGRATULATIONS---YOU CAME OUT EVEN, NOT BAD FOR AN AMATEUR" 360 END 10 PRINT TAB(34);"CUBE" 20 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 30 PRINT : PRINT : PRINT 100 PRINT "DO YOU WANT TO SEE THE INSTRUCTIONS? (YES--1,NO--0)" 110 INPUT B7 120 IF B7=0 THEN 370 130 PRINT"THIS IS A GAME IN WHICH YOU WILL BE PLAYING AGAINST THE" 140 PRINT"RANDOM DECISION OF THE COMPUTER. THE FIELD OF PLAY IS A" 150 PRINT"CUBE OF SIDE 3. ANY OF THE 27 LOCATIONS CAN BE DESIGNATED" 160 PRINT"BY INPUTING THREE NUMBERS SUCH AS 2,3,1. AT THE START," 170 PRINT"YOU ARE AUTOMATICALLY AT LOCATION 1,1,1. THE OBJECT OF" 180 PRINT"THE GAME IS TO GET TO LOCATION 3,3,3. ONE MINOR DETAIL:" 190 PRINT"THE COMPUTER WILL PICK, AT RANDOM, 5 LOCATIONS AT WHICH" 200 PRINT"IT WILL PLANT LAND MINES. IF YOU HIT ONE OF THESE LOCATIONS" 210 PRINT"YOU LOSE. ONE OTHER DETAIL: YOU MAY MOVE ONLY ONE SPACE " 220 PRINT"IN ONE DIRECTION EACH MOVE. FOR EXAMPLE: FROM 1,1,2 YOU" 230 PRINT"MAY MOVE TO 2,1,2 OR 1,1,3. YOU MAY NOT CHANGE" 240 PRINT"TWO OF THE NUMBERS ON THE SAME MOVE. IF YOU MAKE AN ILLEGAL" 250 PRINT"MOVE, YOU LOSE AND THE COMPUTER TAKES THE MONEY YOU MAY" 260 PRINT"HAVE BET ON THAT ROUND." 270 PRINT 280 PRINT 290 PRINT"ALL YES OR NO QUESTIONS WILL BE ANSWERED BY A 1 FOR YES" 300 PRINT"OR A 0 (ZERO) FOR NO." 310 PRINT 320 PRINT"WHEN STATING THE AMOUNT OF A WAGER, PRINT ONLY THE NUMBER" 330 PRINT"OF DOLLARS (EXAMPLE: 250) YOU ARE AUTOMATICALLY STARTED WITH" 340 PRINT"500 DOLLARS IN YOUR ACCOUNT." 350 PRINT 360 PRINT "GOOD LUCK!" 370 LET A1=500 380 LET A=INT(3*(RND(X))) 390 IF A<>0 THEN 410 400 LET A=3 410 LET B=INT(3*(RND(X))) 420 IF B<>0 THEN 440 430 LET B=2 440 LET C=INT(3*(RND(X))) 450 IF C<>0 THEN 470 460 LET C=3 470 LET D=INT(3*(RND(X))) 480 IF D<>0 THEN 500 490 LET D=1 500 LET E=INT(3*(RND(X))) 510 IF E<>0 THEN 530 520 LET E=3 530 LET F=INT(3*(RND(X))) 540 IF F<>0 THEN 560 550 LET F=3 560 LET G=INT(3*(RND(X))) 570 IF G<>0 THEN 590 580 LET G=3 590 LET H=INT(3*(RND(X))) 600 IF H<>0 THEN 620 610 LET H=3 620 LET I=INT(3*(RND(X))) 630 IF I<>0 THEN 650 640 LET I=2 650 LET J=INT(3*(RND(X))) 660 IF J<>0 THEN 680 670 LET J=3 680 LET K=INT(3*(RND(X))) 690 IF K<>0 THEN 710 700 LET K=2 710 LET L=INT(3*(RND(X))) 720 IF L<>0 THEN 740 730 LET L=3 740 LET M=INT(3*(RND(X))) 750 IF M<>0 THEN 770 760 LET M=3 770 LET N=INT(3*(RND(X))) 780 IF N<>0 THEN 800 790 LET N=1 800 LET O=INT (3*(RND(X))) 810 IF O <>0 THEN 830 820 LET O=3 830 PRINT "WANT TO MAKE A WAGER?" 840 INPUT Z 850 IF Z=0 THEN 920 860 PRINT "HOW MUCH "; 870 INPUT Z1 876 IF A1<Z1 THEN 1522 880 LET W=1 890 LET X=1 900 LET Y=1 910 PRINT 920 PRINT "IT'S YOUR MOVE: "; 930 INPUT P,Q,R 940 IF P>W+1 THEN 1030 950 IF P=W+1 THEN 1000 960 IF Q>X+1 THEN 1030 970 IF Q=(X+1) THEN 1010 980 IF R >(Y+1) THEN 1030 990 GOTO 1050 1000 IF Q>= X+1 THEN 1030 1010 IF R>=Y+1 THEN 1030 1020 GOTO 1050 1030 PRINT:PRINT "ILLEGAL MOVE. YOU LOSE." 1040 GOTO 1440 1050 LET W=P 1060 LET X=Q 1070 LET Y=R 1080 IF P=3 THEN 1100 1090 GOTO 1130 1100 IF Q=3 THEN 1120 1110 GOTO 1130 1120 IF R=3 THEN 1530 1130 IF P=A THEN 1150 1140 GOTO 1180 1150 IF Q=B THEN 1170 1160 GOTO 1180 1170 IF R=C THEN 1400 1180 IF P=D THEN 1200 1190 GOTO 1230 1200 IF Q=E THEN 1220 1210 GOTO 1230 1220 IF R=F THEN 1400 1230 IF P=G THEN 1250 1240 GOTO 1280 1250 IF Q=H THEN 1270 1260 GOTO 1280 1270 IF R=I THEN 1400 1280 IF P=J THEN 1300 1290 GOTO 1330 1300 IF Q=K THEN 1320 1310 GOTO 1330 1320 IF R=L THEN 1440 1330 IF P=M THEN 1350 1340 GOTO 1380 1350 IF Q=N THEN 1370 1360 GOTO 1380 1370 IF R=O THEN 1400 1380 PRINT "NEXT MOVE: "; 1390 GOTO 930 1400 PRINT"******BANG******" 1410 PRINT "YOU LOSE!" 1420 PRINT 1430 PRINT 1440 IF Z=0 THEN 1580 1450 PRINT 1460 LET Z2=A1-Z1 1470 IF Z2>0 THEN 1500 1480 PRINT "YOU BUST." 1490 GOTO 1610 1500 PRINT " YOU NOW HAVE"; Z2; "DOLLARS." 1510 LET A1=Z2 1520 GOTO 1580 1522 PRINT"TRIED TO FOOL ME; BET AGAIN"; 1525 GOTO 870 1530 PRINT"CONGRATULATIONS!" 1540 IF Z=0 THEN 1580 1550 LET Z2=A1+Z1 1560 PRINT "YOU NOW HAVE"; Z2;"DOLLARS." 1570 LET A1=Z2 1580 PRINT"DO YOU WANT TO TRY AGAIN "; 1590 INPUT S 1600 IF S=1 THEN 380 1610 PRINT "TOUGH LUCK!" 1620 PRINT 1630 PRINT "GOODBYE." 1640 END 2 PRINT TAB(30);"DEPTH CHARGE" 4 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 6 PRINT: PRINT: PRINT 20 INPUT "DIMENSION OF SEARCH AREA";G: PRINT 30 N=INT(LOG(G)/LOG(2))+1 40 PRINT "YOU ARE THE CAPTAIN OF THE DESTROYER USS COMPUTER" 50 PRINT "AN ENEMY SUB HAS BEEN CAUSING YOU TROUBLE. YOUR" 60 PRINT "MISSION IS TO DESTROY IT. YOU HAVE";N;"SHOTS." 70 PRINT "SPECIFY DEPTH CHARGE EXPLOSION POINT WITH A" 80 PRINT "TRIO OF NUMBERS -- THE FIRST TWO ARE THE" 90 PRINT "SURFACE COORDINATES; THE THIRD IS THE DEPTH." 100 PRINT : PRINT "GOOD LUCK !": PRINT 110 A=INT(G*RND(1)) : B=INT(G*RND(1)) : C=INT(G*RND(1)) 120 FOR D=1 TO N : PRINT : PRINT "TRIAL #";D; : INPUT X,Y,Z 130 IF ABS(X-A)+ABS(Y-B)+ABS(Z-C)=0 THEN 300 140 GOSUB 500 : PRINT : NEXT D 200 PRINT : PRINT "YOU HAVE BEEN TORPEDOED! ABANDON SHIP!" 210 PRINT "THE SUBMARINE WAS AT";A;",";B;",";C : GOTO 400 300 PRINT : PRINT "B O O M ! ! YOU FOUND IT IN";D;"TRIES!" 400 PRINT : PRINT: INPUT "ANOTHER GAME (Y OR N)";A$ 410 IF A$="Y" THEN 100 420 PRINT "OK. HOPE YOU ENJOYED YOURSELF." : GOTO 600 500 PRINT "SONAR REPORTS SHOT WAS "; 510 IF Y>B THEN PRINT "NORTH"; 520 IF Y<B THEN PRINT "SOUTH"; 530 IF X>A THEN PRINT "EAST"; 540 IF X<A THEN PRINT "WEST"; 550 IF Y<>B OR X<>A THEN PRINT " AND"; 560 IF Z>C THEN PRINT " TOO LOW." 570 IF Z<C THEN PRINT " TOO HIGH." 580 IF Z=C THEN PRINT " DEPTH OK." 590 RETURN 600 END 1 PRINT TAB(33);"DIAMOND" 2 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 3 PRINT:PRINT:PRINT 4 PRINT "FOR A PRETTY DIAMOND PATTERN," 5 INPUT "TYPE IN AN ODD NUMBER BETWEEN 5 AND 21";R:PRINT 6 Q=INT(60/R):A$="CC" 8 FOR L=1 TO Q 10 X=1:Y=R:Z=2 20 FOR N=X TO Y STEP Z 25 PRINT TAB((R-N)/2); 28 FOR M=1 TO Q 29 C=1 30 FOR A=1 TO N 32 IF C>LEN(A$) THEN PRINT "!";:GOTO 50 34 PRINT MID$(A$,C,1); 36 C=C+1 50 NEXT A 53 IF M=Q THEN 60 55 PRINT TAB(R*M+(R-N)/2); 56 NEXT M 60 PRINT 70 NEXT N 83 IF X<>1 THEN 95 85 X=R-2:Y=1:Z=-2 90 GOTO 20 95 NEXT L 99 END 2 PRINT TAB(34);"DICE" 4 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 6 PRINT:PRINT:PRINT 10 DIM F(12) 20 REM DANNY FREIDUS 30 PRINT "THIS PROGRAM SIMULATES THE ROLLING OF A" 40 PRINT "PAIR OF DICE." 50 PRINT "YOU ENTER THE NUMBER OF TIMES YOU WANT THE COMPUTER TO" 60 PRINT "'ROLL' THE DICE. WATCH OUT, VERY LARGE NUMBERS TAKE" 70 PRINT "A LONG TIME. IN PARTICULAR, NUMBERS OVER 5000." 80 FOR Q=1 TO 12 90 F(Q)=0 100 NEXT Q 110 PRINT:PRINT "HOW MANY ROLLS"; 120 INPUT X 130 FOR S=1 TO X 140 A=INT(6*RND(1)+1) 150 B=INT(6*RND(1)+1) 160 R=A+B 170 F(R)=F(R)+1 180 NEXT S 185 PRINT 190 PRINT "TOTAL SPOTS","NUMBER OF TIMES" 200 FOR V=2 TO 12 210 PRINT V,F(V) 220 NEXT V 221 PRINT 222 PRINT:PRINT "TRY AGAIN"; 223 INPUT Z$ 224 IF Z$="YES" THEN 80 240 END 10 PRINT TAB(33);"DIGITS" 20 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 30 PRINT:PRINT:PRINT 210 PRINT "THIS IS A GAME OF GUESSING." 220 PRINT "FOR INSTRUCTIONS, TYPE '1', ELSE TYPE '0'"; 230 INPUT E 240 IF E=0 THEN 360 250 PRINT 260 PRINT "PLEASE TAKE A PIECE OF PAPER AND WRITE DOWN" 270 PRINT "THE DIGITS '0', '1', OR '2' THIRTY TIMES AT RANDOM." 280 PRINT "ARRANGE THEM IN THREE LINES OF TEN DIGITS EACH." 290 PRINT "I WILL ASK FOR THEN TEN AT A TIME." 300 PRINT "I WILL ALWAYS GUESS THEM FIRST AND THEN LOOK AT YOUR" 310 PRINT "NEXT NUMBER TO SEE IF I WAS RIGHT. BY PURE LUCK," 320 PRINT "I OUGHT TO BE RIGHT TEN TIMES. BUT I HOPE TO DO BETTER" 330 PRINT "THAN THAT *****" 340 PRINT:PRINT 360 READ A,B,C 370 DATA 0,1,3 380 DIM M(26,2),K(2,2),L(8,2) 400 FOR I=0 TO 26: FOR J=0 TO 2: M(I,J)=1: NEXT J: NEXT I 410 FOR I=0 TO 2: FOR J=0 TO 2: K(I,J)=9: NEXT J: NEXT I 420 FOR I=0 TO 8: FOR J=0 TO 2: L(I,J)=3: NEXT J: NEXT I 450 L(0,0)=2: L(4,1)=2: L(8,2)=2 480 Z=26: Z1=8: Z2=2 510 X=0 520 FOR T=1 TO 3 530 PRINT 540 PRINT "TEN NUMBERS, PLEASE"; 550 INPUT N(1),N(2),N(3),N(4),N(5),N(6),N(7),N(8),N(9),N(10) 560 FOR I=1 TO 10 570 W=N(I)-1 580 IF W=SGN(W) THEN 620 590 PRINT "ONLY USE THE DIGITS '0', '1', OR '2'." 600 PRINT "LET'S TRY AGAIN.":GOTO 530 620 NEXT I 630 PRINT: PRINT "MY GUESS","YOUR NO.","RESULT","NO. RIGHT":PRINT 660 FOR U=1 TO 10 670 N=N(U): S=0 690 FOR J=0 TO 2 700 S1=A*K(Z2,J)+B*L(Z1,J)+C*M(Z,J) 710 IF S>S1 THEN 760 720 IF S<S1 THEN 740 730 IF RND(1)<.5 THEN 760 740 S=S1: G=J 760 NEXT J 770 PRINT " ";G," ";N(U), 780 IF G=N(U) THEN 810 790 PRINT " WRONG",X 800 GOTO 880 810 X=X+1 820 PRINT " RIGHT",X 830 M(Z,N)=M(Z,N)+1 840 L(Z1,N)=L(Z1,N)+1 850 K(Z2,N)=K(Z2,N)+1 860 Z=Z-INT(Z/9)*9 870 Z=3*Z+N(U) 880 Z1=Z-INT(Z/9)*9 890 Z2=N(U) 900 NEXT U 910 NEXT T 920 PRINT 930 IF X>10 THEN 980 940 IF X<10 THEN 1010 950 PRINT "I GUESSED EXACTLY 1/3 OF YOUR NUMBERS." 960 PRINT "IT'S A TIE GAME." 970 GOTO 1030 980 PRINT "I GUESSED MORE THAN 1/3 OF YOUR NUMBERS." 990 PRINT "I WIN.": FOR Q=1 TO 10: PRINT CHR$(7);: NEXT Q 1000 GOTO 1030 1010 PRINT "I GUESSED LESS THAN 1/3 OF YOUR NUMBERS." 1020 PRINT "YOU BEAT ME. CONGRATULATIONS *****" 1030 PRINT 1040 PRINT "DO YOU WANT TO TRY AGAIN (1 FOR YES, 0 FOR NO)"; 1060 INPUT X 1070 IF X=1 THEN 400 1080 PRINT:PRINT "THANKS FOR THE GAME." 1090 END 1 PRINT TAB(31);"EVEN WINS" 2 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 3 PRINT:PRINT 4 Y1=0 10 M1=0 20 DIM M(20),Y(20) 30 PRINT " THIS IS A TWO PERSON GAME CALLED 'EVEN WINS.'" 40 PRINT "TO PLAY THE GAME, THE PLAYERS NEED 27 MARBLES OR" 50 PRINT "OTHER OBJECTS ON A TABLE." 60 PRINT 70 PRINT 80 PRINT " THE 2 PLAYERS ALTERNATE TURNS, WITH EACH PLAYER" 90 PRINT "REMOVING FROM 1 TO 4 MARBLES ON EACH MOVE. THE GAME" 100 PRINT "ENDS WHEN THERE ARE NO MARBLES LEFT, AND THE WINNER" 110 PRINT "IS THE ONE WITH AN EVEN NUMBER OF MARBLES." 120 PRINT 130 PRINT 140 PRINT " THE ONLY RULES ARE THAT (1) YOU MUST ALTERNATE TURNS," 150 PRINT "(2) YOU MUST TAKE BETWEEN 1 AND 4 MARBLES EACH TURN," 160 PRINT "AND (3) YOU CANNOT SKIP A TURN." 170 PRINT 180 PRINT 190 PRINT 200 PRINT " TYPE A '1' IF YOU WANT TO GO FIRST, AND TYPE" 210 PRINT "A '0' IF YOU WANT ME TO GO FIRST." 220 INPUT C 225 PRINT 230 IF C=0 THEN 250 240 GOTO 1060 250 T=27 260 M=2 270 PRINT:PRINT "TOTAL=";T:PRINT 280 M1=M1+M 290 T=T-M 300 PRINT "I PICK UP";M;"MARBLES." 310 IF T=0 THEN 880 320 PRINT:PRINT "TOTAL=";T 330 PRINT 340 PRINT " AND WHAT IS YOUR NEXT MOVE, MY TOTAL IS";M1 350 INPUT Y 360 PRINT 370 IF Y<1 THEN 1160 380 IF Y>4 THEN 1160 390 IF Y<=T THEN 430 400 PRINT " YOU HAVE TRIED TO TAKE MORE MARBLES THAN THERE ARE" 410 PRINT "LEFT. TRY AGAIN." 420 GOTO 350 430 Y1=Y1+Y 440 T=T-Y 450 IF T=0 THEN 880 460 PRINT "TOTAL=";T 470 PRINT 480 PRINT "YOUR TOTAL IS";Y1 490 IF T<.5 THEN 880 500 R=T-6*INT(T/6) 510 IF INT(Y1/2)=Y1/2 THEN 700 520 IF T<4.2 THEN 580 530 IF R>3.4 THEN 620 540 M=R+1 550 M1=M1+M 560 T=T-M 570 GOTO 300 580 M=T 590 T=T-M 600 GOTO 830 610 REM 250 IS WHERE I WIN. 620 IF R<4.7 THEN 660 630 IF R>3.5 THEN 660 640 M=1 650 GOTO 670 660 M=4 670 T=T-M 680 M1=M1+M 690 GOTO 300 700 REM I AM READY TO ENCODE THE STRAT FOR WHEN OPP TOT IS EVEN 710 IF R<1.5 THEN 1020 720 IF R>5.3 THEN 1020 730 M=R-1 740 M1=M1+M 750 T=T-M 760 IF T<.2 THEN 790 770 REM IS # ZERO HERE 780 GOTO 300 790 REM IS = ZERO HERE 800 PRINT "I PICK UP";M;"MARBLES." 810 PRINT 820 GOTO 880 830 REM THIS IS WHERE I WIN 840 PRINT "I PICK UP";M;"MARBLES." 850 PRINT 860 PRINT "TOTAL = 0" 870 M1=M1+M 880 PRINT "THAT IS ALL OF THE MARBLES." 890 PRINT 900 PRINT " MY TOTAL IS";M1;", YOUR TOTAL IS";Y1 910 PRINT 920 IF INT(M1/2)=M1/2 THEN 950 930 PRINT " YOU WON. DO YOU WANT TO PLAY" 940 GOTO 960 950 PRINT " I WON. DO YOU WANT TO PLAY" 960 PRINT "AGAIN? TYPE 1 FOR YES AND 0 FOR NO." 970 INPUT A1 980 IF A1=0 THEN 1030 990 M1=0 1000 Y1=0 1010 GOTO 200 1020 GOTO 640 1030 PRINT 1040 PRINT "OK. SEE YOU LATER." 1050 GOTO 1230 1060 T=27 1070 PRINT 1080 PRINT 1090 PRINT 1100 PRINT "TOTAL=";T 1110 PRINT 1120 PRINT 1130 PRINT "WHAT IS YOUR FIRST MOVE"; 1140 INPUT Y 1150 GOTO 360 1160 PRINT 1170 PRINT "THE NUMBER OF MARBLES YOU TAKE MUST BE A POSITIVE" 1180 PRINT "INTEGER BETWEEN 1 AND 4." 1190 PRINT 1200 PRINT " WHAT IS YOUR NEXT MOVE?" 1210 PRINT 1220 GOTO 350 1230 END 2 PRINT TAB(32);"FLIPFLOP" 4 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 6 PRINT 10 REM *** CREATED BY MICHAEL CASS 15 DIM A$(20) 20 PRINT "THE OBJECT OF THIS PUZZLE IS TO CHANGE THIS:" 30 PRINT 40 PRINT "X X X X X X X X X X" 50 PRINT 60 PRINT "TO THIS:" 70 PRINT 80 PRINT "O O O O O O O O O O" 90 PRINT 100 PRINT "BY TYPING THE NUMBER CORRESPONDING TO THE POSITION OF THE" 110 PRINT "LETTER ON SOME NUMBERS, ONE POSITION WILL CHANGE, ON" 120 PRINT "OTHERS, TWO WILL CHANGE. TO RESET LINE TO ALL X'S, TYPE 0" 130 PRINT "(ZERO) AND TO START OVER IN THE MIDDLE OF A GAME, TYPE " 140 PRINT "11 (ELEVEN)." 170 PRINT 180 REM 190 Q=RND(1) 200 PRINT "HERE IS THE STARTING LINE OF X'S." 210 PRINT 220 C=0 230 PRINT "1 2 3 4 5 6 7 8 9 10" 240 PRINT "X X X X X X X X X X" 250 PRINT 260 REM 270 FOR X=1 TO 10 280 A$(X)="X" 290 NEXT X 300 GOTO 320 310 PRINT "ILLEGAL ENTRY--TRY AGAIN." 320 PRINT "INPUT THE NUMBER"; 330 INPUT N 340 IF N<>INT(N) THEN 310 350 IF N=11 THEN 180 360 IF N>11 THEN 310 370 IF N=0 THEN 230 380 IF M=N THEN 510 390 M=N 400 IF A$(N)="O" THEN 480 410 A$(N)="O" 420 R=TAN(Q+N/Q-N)-SIN(Q/N)+336*SIN(8*N) 430 N=R-INT(R) 440 N=INT(10*N) 450 IF A$(N)="O" THEN 480 460 A$(N)="O" 470 GOTO 610 480 A$(N)="X" 490 IF M=N THEN 420 500 GOTO 610 510 IF A$(N)="O" THEN 590 520 A$(N)="O" 530 R=.592*(1/TAN(Q/N+Q))/SIN(N*2+Q)-COS(N) 540 N=R-INT(R) 550 N=INT(10*N) 560 IF A$(N)="O" THEN 590 570 A$(N)="O" 580 GOTO 610 590 A$(N)="X" 600 IF M=N THEN 530 610 PRINT "1 2 3 4 5 6 7 8 9 10" 620 FOR Z=1 TO 10: PRINT A$(Z);" ";: NEXT Z 630 C=C+1 640 PRINT 650 FOR Z=1 TO 10 660 IF A$(Z)<>"O" THEN 320 670 NEXT Z 680 IF C>12 THEN 710 690 PRINT "VERY GOOD. YOU GUESSED IT IN ONLY";C;"GUESSES." 700 GOTO 720 710 PRINT "TRY HARDER NEXT TIME. IT TOOK YOU";C;"GUESSES." 720 PRINT "DO YOU WANT TO TRY ANOTHER PUZZLE"; 730 INPUT X$ 740 IF LEFT$(X$,1)="N" THEN 780 760 PRINT 770 GOTO 180 780 END 1 PRINT TAB(32);"FOOTBALL" 2 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 3 PRINT:PRINT:PRINT 100 REM 120 DIM A(20),B(20),C(40),H(2),T(2),W(2),X(2),Y(2),Z(2) 130 DIM M$(2),D(2),P$(20) 140 PRINT "PRESENTING N.F.U. FOOTBALL (NO FORTRAN USED)" 145 PRINT:PRINT 150 INPUT "DO YOU WANT INSTRUCTIONS";A$ 160 IF A$="NO" THEN 290 165 IF A$<>"YES" THEN 150 170 PRINT "THIS IS A FOOTBALL GAME FOR TWO TEAMS IN WHICH PLAYERS MUST" 180 PRINT "PREPARE A TAPE WITH A DATA STATEMENT (1770 FOR TEAM 1," 190 PRINT "1780 FOR TEAM 2) IN WHICH EACH TEAM SCRAMBLES NOS. 1-20" 195 PRINT "THESE NUMBERS ARE THEN ASSIGNED TO TWENTY GIVEN PLAYS." 200 PRINT"A LIST OF NOS. AND THEIR PLAYS IS PROVIDED WITH" 210 PRINT "BOTH TEAMS HAVING THE SAME PLAYS. THE MORE SIMILAR THE" 220 PRINT "PLAYS THE LESS YARDAGE GAINED. SCORES ARE GIVEN" 223 PRINT "WHENEVER SCORES ARE MADE. SCORES MAY ALSO BE OBTAINED" 225 PRINT "BY INPUTTING 99,99 FOR PLAY NOS. TO PUNT OR ATTEMPT A" 227 PRINT "FIELD GOAL, INPUT 77,77 FOR PLAY NUMBERS. QUESTIONS WILL BE" 230 PRINT "ASKED THEN. ON 4TH DOWN, YOU WILL ALSO BE ASKED WHETHER" 240 PRINT "YOU WANT TO PUNT OR ATTEMPT A FIELD GOAL. IF THE ANSWER TO" 250 PRINT "BOTH QUESTIONS IS NO IT WILL BE ASSUMED YOU WANT TO" 260 PRINT "TRY AND GAIN YARDAGE. ANSWER ALL QUESTIONS YES OR NO." 270 PRINT "THE GAME IS PLAYED UNTIL PLAYERS TERMINATE (CONTROL-C)." 280 PRINT "PLEASE PREPARE A TAPE AND RUN.": STOP 290 PRINT:PRINT "PLEASE INPUT SCORE LIMIT ON GAME";:INPUT E 300 FOR I=1 TO 40: READ N: IF I>20 THEN 350 330 A(N)=I: GOTO 360 350 B(N)=I-20 360 C(I)=N: NEXT I 370 FOR I=1 TO 20: READ P$(I): NEXT I 380 L=0: T=1 410 PRINT "TEAM";T;"PLAY CHART" 420 PRINT "NO. PLAY" 430 FOR I=1 TO 20 440 REM 450 PRINT C(I+L);TAB(6);P$(I) 460 NEXT I 630 L=L+20:T=2 640 PRINT 650 PRINT "TEAR OFF HERE----------------------------------------------" 660 FOR X=1 TO 11: PRINT: NEXT X 670 FOR Z=1 TO 3000: NEXT Z 680 IF L=20 THEN 410 690 D(1)=0: D(2)=3: M$(1)="--->": M$(2)="<---" 700 H(1)=0: H(2)=0: T(1)=2: T(2)=1 710 W(1)=-1: W(2)=1: X(1)=100: X(2)=0 720 Y(1)=1: Y(2)=-1: Z(1)=0: Z(2)=100 725 GOSUB 1910 730 PRINT "TEAM 1 DEFENDS 0 YD GOAL -- TEAM 2 DEFENDS 100 YD GOAL." 740 T=INT(2*RND(1)+1) 760 PRINT: PRINT "THE COIN IS FLIPPED" 765 P=X(T)-Y(T)*40 770 GOSUB 1860: PRINT : PRINT "TEAM";T;"RECEIVES KICK-OFF" 780 K=INT(26*RND(1)+40) 790 P=P-Y(T)*K 794 IF W(T)*P<Z(T)+10 THEN 810 795 PRINT: PRINT "BALL WENT OUT OF ENDZONE --AUTOMATIC TOUCHBACK--" 796 GOTO 870 810 PRINT "BALL WENT";K;"YARDS. NOW ON";P:GOSUB 1900 830 PRINT "TEAM";T;"DO YOU WANT TO RUNBACK";:INPUT A$ 840 IF A$="YES" THEN 1430 845 IF A$<>"NO" THEN 830 850 IF W(T)*P<Z(T) THEN 880 870 P=Z(T)-W(T)*20 880 D=1: S=P 885 FOR I=1 TO 72: PRINT "=";: NEXT I 890 PRINT: PRINT "TEAM";T;"DOWN";D;"ON";P 893 IF D<>1 THEN 900 895 IF Y(T)*(P+Y(T)*10)>=X(T) THEN 898 897 C=4: GOTO 900 898 C=8 900 IF C=8 THEN 904 901 PRINT TAB(27);10-(Y(T)*P-Y(T)*S);"YARDS TO 1ST DOWN" 902 GOTO 910 904 PRINT TAB(27);X(T)-Y(T)*P;"YARDS" 910 GOSUB 1900: IF D=4 THEN 1180 920 REM 930 U=INT(3*RND(0)-1): GOTO 940 936 PRINT "ILLEGAL PLAY NUMBER, CHECK AND" 940 PRINT "INPUT OFFENSIVE PLAY, DEFENSIVE PLAY"; 950 IF T=2 THEN 970 960 INPUT P1,P2: GOTO 975 970 INPUT P2,P1 975 IF P1=77 THEN 1180 980 IF P1>20 THEN 1800 985 IF P1<1 THEN 1800 990 IF P2>20 THEN 1800 992 IF P2<1 THEN 1800 995 P1=INT(P1): P2=INT(P2) 1000 Y=INT(ABS(A(P1)-B(P2))/19*((X(T)-Y(T)*P+25)*RND(1)-15)) 1005 PRINT: IF T=2 THEN 1015 1010 IF A(P1)<11 THEN 1048 1012 GOTO 1020 1015 IF B(P2)<11 THEN 1048 1020 IF U<>0 THEN 1035 1025 PRINT "PASS INCOMPLETE TEAM";T 1030 Y=0: GOTO 1050 1035 G=RND(1): IF G>.025 THEN 1040 1037 IF Y>2 THEN 1045 1040 PRINT "QUARTERBACK SCRAMBLED": GOTO 1050 1045 PRINT "PASS COMPLETED": GOTO 1050 1048 PRINT "THE BALL WAS RUN" 1050 P=P-W(T)*Y 1060 PRINT: PRINT "NET YARDS GAINED ON DOWN";D;"ARE ";Y 1070 G=RND(1): IF G>.025 THEN 1110 1080 PRINT: PRINT "** LOSS OF POSSESSION FROM TEAM";T;"TO TEAM";T(T) 1100 GOSUB 1850: PRINT: T=T(T): GOTO 830 1110 IF Y(T)*P>=X(T) THEN 1320 1120 IF W(T)*P>=Z(T) THEN 1230 1130 IF Y(T)*P-Y(T)*S>=10 THEN 880 1140 D=D+1: IF D<>5 THEN 885 1160 PRINT: PRINT "CONVERSION UNSUCCESSFUL TEAM";T:T=T(T) 1170 GOSUB 1850: GOTO 880 1180 PRINT "DOES TEAM";T;"WANT TO PUNT";: INPUT A$ 1185 IF A$="NO" THEN 1200 1187 IF A$<>"YES" THEN 1180 1190 PRINT:PRINT "TEAM";T;"WILL PUNT": G=RND(1): IF G<.025 THEN 1080 1195 GOSUB 1850: K=INT(25*RND(1)+35): T=T(T): GOTO 790 1200 PRINT "DOES TEAM";T;"WANT TO ATTEMPT A FIELD GOAL";: INPUT A$ 1210 IF A$="YES" THEN 1640 1215 IF A$<>"NO" THEN 1200 1217 GOTO 920 1230 PRINT: PRINT "SAFETY AGAINST TEAM";T;"**********************OH-OH" 1240 H(T(T))=H(T(T))+2: GOSUB 1810 1280 PRINT"TEAM";T;"DO YOU WANT TO PUNT INSTEAD OF A KICKOFF";:INPUT A$ 1290 P=Z(T)-W(T)*20: IF A$="YES" THEN 1190 1320 PRINT: PRINT "TOUCHDOWN BY TEAM";T;"*********************YEA TEAM" 1340 Q=7: G=RND(1): IF G>.1 THEN 1380 1360 Q=6: PRINT "EXTRA POINT NO GOOD": GOTO 1390 1380 PRINT "EXTRA POINT GOOD" 1390 H(T)=H(T)+Q: GOSUB 1810 1420 T=T(T): GOTO 765 1430 K=INT(9*RND(0)+1) 1440 R=INT(((X(T)-Y(T)*P+25)*RND(1)-15)/K) 1460 P=P-W(T)*R 1480 PRINT:PRINT "RUNBACK TEAM";T;R;"YARDS" 1485 G=RND(1): IF G<.025 THEN 1080 1490 IF Y(T)*P>=X(T) THEN 1320 1500 IF W(T)*P>=Z(T) THEN 1230 1510 GOTO 880 1640 PRINT: PRINT "TEAM";T;"WILL ATTEMPT A FIELD GOAL" 1645 G=RND(1): IF G<.025 THEN 1080 1650 F=INT(35*RND(1)+20) 1660 PRINT: PRINT "KICK IS";F;"YARDS LONG" 1680 P=P-W(T)*F: G=RND(1) 1690 IF G<.35 THEN 1735 1700 IF Y(T)*P<X(T) THEN 1740 1710 PRINT "FIELD GOAL GOOD FOR TEAM";T;"*********************YEA" 1720 Q=3: GOTO 1390 1735 PRINT "BALL WENT WIDE" 1740 PRINT "FIELD GOAL UNSUCCESFUL TEAM";T;"-----------------TOO BAD" 1742 GOSUB 1850: IF Y(T)*P<X(T)+10 THEN 1745 1744 T=T(T): GOTO 794 1745 PRINT: PRINT "BALL NOW ON";P 1750 T=T(T): GOSUB 1900: GOTO 830 1770 DATA 17,8,4,14,19,3,10,1,7,11,15,9,5,20,13,18,16,2,12,6 1780 DATA 20,2,17,5,8,18,12,11,1,4,19,14,10,7,9,15,6,13,16,3 1790 DATA "PITCHOUT","TRIPLE REVERSE","DRAW","QB SNEAK","END AROUND" 1792 DATA "DOUBLE REVERSE","LEFT SWEEP","RIGHT SWEEP","OFF TACKLE" 1794 DATA "WISHBONE OPTION","FLARE PASS","SCREEN PASS" 1796 DATA "ROLL OUT OPTION","RIGHT CURL","LEFT CURL","WISHBONE OPTION" 1798 DATA "SIDELINE PASS","HALF-BACK OPTION","RAZZLE-DAZZLE","BOMB!!!!" 1800 IF P1<>99 THEN 936 1810 PRINT: PRINT "TEAM 1 SCORE IS";H(1) 1820 PRINT "TEAM 2 SCORE IS";H(2): PRINT 1825 IF H(T)<E THEN 1830 1827 PRINT "TEAM";T;"WINS*******************": GOTO 2000 1830 IF P1=99 THEN 940 1835 RETURN 1850 PRINT 1860 FOR X=1 TO 72: PRINT "+";: NEXT X: PRINT 1870 RETURN 1900 PRINT TAB(D(T)+5+P/2);M$(T) 1910 PRINT "TEAM 1 [0 10 20 30 40 50 60 70 80 90"; 1915 PRINT " 100] TEAM 2" 1920 PRINT 1930 RETURN 2000 END 10 PRINT TAB(33);"FTBALL" 20 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 30 PRINT:PRINT 220 PRINT "THIS IS DARTMOUTH CHAMPIONSHIP FOOTBALL.":PRINT 230 PRINT "YOU WILL QUARTERBACK DARTMOUTH. CALL PLAYS AS FOLLOWS:" 240 PRINT "1= SIMPLE RUN; 2= TRICKY RUN; 3= SHORT PASS;" 250 PRINT "4= LONG PASS; 5= PUNT; 6= QUICK KICK; 7= PLACE KICK." 260 PRINT 270 PRINT "CHOOSE YOUR OPPONENT"; 280 INPUT O$(1) 290 O$(0)="DARTMOUTH" 300 PRINT 310 LET S(0)=0: LET S(1)=0 320 REM 330 DIM L$(20) 340 FOR I=1 TO 20: READ L$(I): NEXT I 350 DATA "KICK","RECEIVE"," YARD ","RUN BACK FOR ","BALL ON " 360 DATA "YARD LINE"," SIMPLE RUN"," TRICKY RUN"," SHORT PASS" 370 DATA " LONG PASS","PUNT"," QUICK KICK "," PLACE KICK"," LOSS " 380 DATA " NO GAIN","GAIN "," TOUCHDOWN "," TOUCHBACK ","SAFETY***" 385 DATA "JUNK" 390 LET P=INT(RND(1)*2) 400 PRINT O$(P);" WON THE TOSS" 410 DEF FNF(X)=1-2*P 420 DEF FNG(Z)=P*(X1-X)+(1-P)*(X-X1) 430 IF P=0 THEN 470 440 PRINT O$(1);" ELECTS TO RECEIVE." 450 PRINT 460 GOTO 580 470 PRINT "DO YOU ELECT TO KICK OR RECEIVE"; 480 INPUT A$ 490 PRINT 500 FOR E=1 TO 2 510 IF A$=L$(E) THEN 550 520 NEXT E 530 PRINT "INCORRECT ANSWER. PLEASE TYPE 'KICK' OR 'RECIEVE'"; 540 GOTO 480 550 IF E=2 THEN 580 560 LET P=1 580 LET X=40+(1-P)*20 590 LET Y=INT(200*(RND(1)-.5)^3+55) 600 PRINT Y;L$(3);" KICKOFF" 610 LET X=X-FNF(1)*Y 620 IF ABS(X-50)>=50 THEN 700 630 LET Y=INT(50*RND(1)^2)+(1-P)*INT(50*RND(1)^4) 640 LET X=X+FNF(1)*Y 650 IF ABS(X-50)>=50 THEN 655 651 PRINT Y;L$(3);" RUNBACK" 652 GOTO 720 655 PRINT L$(4); 660 GOTO 2600 700 PRINT "TOUCHBACK FOR ";O$(P);"." 710 LET X=20+P*60 720 REM FIRST DOWN 730 GOSUB 800 740 LET X1=X 750 LET D=1 760 PRINT:PRINT "FIRST DOWN ";O$(P);"***" 770 PRINT 780 PRINT 790 GOTO 860 800 REM PRINT POSITION 810 IF X>50 THEN 840 820 PRINT L$(5);O$(0);X;L$(6) 830 GOTO 850 840 PRINT L$(5);O$(1);100-X;L$(6) 850 RETURN 860 REM NEW PLAY 870 LET T=T+1 880 IF T=30 THEN 1060 890 IF T<50 THEN 940 900 IF RND(1)>.2 THEN 940 910 PRINT "END OF GAME ***" 920 PRINT "FINAL SCORE: ";O$(0);": ";S(0);" ";O$(1);": ";S(1) 930 STOP 940 IF P=1 THEN 1870 950 PRINT "NEXT PLAY"; 960 INPUT Z 970 IF Z<>INT(Z) THEN 990 980 IF ABS(Z-4)<=3 THEN 1010 990 PRINT "ILLEGAL PLAY NUMBER, RETYPE"; 1000 GOTO 960 1010 LET F=0 1020 PRINT L$(Z+6);". "; 1030 LET R=RND(1)*(.98+FNF(1)*.02) 1040 LET R1=RND(1) 1050 ON Z GOTO 1110,1150,1260,1480,1570,1570,1680 1060 REM JEAN'S SPECIAL 1070 IF RND(1)> 1/3 THEN 940 1080 PRINT "GAME DELAYED. DOG ON FIELD." 1090 PRINT 1100 GOTO 940 1110 REM SIMPLE RUN 1120 LET Y=INT(24*(R-.5)^3+3) 1130 IF RND(1)<.05 THEN 1180 1140 GOTO 2190 1150 REM TRICKY RUN 1160 LET Y=INT(20*R-5) 1170 IF RND(1)>.1 THEN 2190 1180 LET F=-1 1190 LET X3=X 1200 LET X=X+FNF(1)*Y 1210 IF ABS(X-50)>=50 THEN 1240 1220 PRINT "*** FUMBLE AFTER "; 1230 GOTO 2230 1240 PRINT "*** FUMBLE." 1250 GOTO 2450 1260 REM SHORT PASS 1270 LET Y=INT(60*(R1-.5)^3+10) 1280 IF R<.05 THEN 1330 1290 IF R<.15 THEN 1390 1300 IF R<.55 THEN 1420 1310 PRINT "COMPLETE. "; 1320 GOTO 2190 1330 IF D=4 THEN 1420 1340 PRINT "INTERCEPTED." 1350 LET F=-1 1360 LET X=X+FNF(1)*Y 1370 IF ABS(X-50)>=50 THEN 2450 1380 GOTO 2300 1390 PRINT "PASSER TACKLED. "; 1400 LET Y=-INT(10*R1) 1410 GOTO 2190 1420 LET Y=0 1430 IF RND(1)<.3 THEN 1460 1440 PRINT "INCOMPLETE. "; 1450 GOTO 2190 1460 PRINT "BATTED DOWN. "; 1470 GOTO 2190 1480 REM LONG PASS 1490 LET Y=INT(160*(R1-.5)^3+30) 1500 IF R<.1 THEN 1330 1510 IF R<.3 THEN 1540 1520 IF R<.75 THEN 1420 1530 GOTO 1310 1540 PRINT "PASSER TACKLED. "; 1550 LET Y=-INT(15*R1+3) 1560 GOTO 2190 1570 REM PUNT OR KICK 1580 LET Y=INT(100*(R-.5)^3+35) 1590 IF D=4 THEN 1610 1600 LET Y=INT(Y*1.3) 1610 PRINT Y;L$(3);" PUNT" 1620 IF ABS(X+Y*FNF(1)-50)>=50 THEN 1670 1630 IF D<4 THEN 1670 1640 LET Y1=INT(R1^2*20) 1650 PRINT Y1;L$(3);" RUN BACK" 1660 LET Y=Y-Y1 1670 GOTO 1350 1680 REM PLACE KICK 1690 LET Y=INT(100*(R-.5)^3+35) 1700 IF R1>.15 THEN 1740 1710 PRINT "KICK IS BLOCKED ***" 1720 LET X=X-5*FNF(1) 1730 LET P=1-P 1740 GOTO 720 1750 LET X=X+FNF(1)*Y 1760 IF ABS(X-50)>=60 THEN 1810 1770 PRINT "KICK IS SHORT." 1780 IF ABS(X-50)>=50 THEN 2710 1790 P=1-P 1800 GOTO 630 1810 IF R1>.5 THEN 1840 1820 PRINT "KICK IS OFF TO THE SIDE." 1830 GOTO 2710 1840 PRINT "FIELD GOAL ***" 1850 LET S(P)=S(P)+3 1860 GOTO 2640 1870 REM OPPONENT'S PLAY 1880 IF D>1 THEN 1940 1890 IF RND(1)>1/3 THEN 1920 1900 LET Z=3 1910 GOTO 1010 1920 LET Z=1 1930 GOTO 1010 1940 IF D=4 THEN 2090 1950 IF 10+X-X1<5 THEN 1890 1960 IF X<5 THEN 1890 1970 IF X<=10 THEN 2160 1980 IF X>X1 THEN 2020 1990 LET A=INT(2*RND(1)) 2000 LET Z=2+A*2 2010 GOTO 1010 2020 IF D<3 THEN 1990 2030 IF X<45 THEN 1990 2040 IF RND(1)>1/4 THEN 2070 2050 LET Z=6 2060 GOTO 1010 2070 LET Z=4 2080 GOTO 1010 2090 IF X>30 THEN 2140 2100 IF 10+X-X1<3 THEN 1890 2110 IF X<3 THEN 1890 2120 LET Z=7 2130 GOTO 1010 2140 LET Z=5 2150 GOTO 1010 2160 LET A=INT(2*RND(1)) 2170 LET Z=2+A 2180 GOTO 1010 2190 REM GAIN OR LOSS 2200 LET X3=X 2210 LET X=X+FNF(1)*Y 2220 IF ABS(X-50)>=50 THEN 2450 2230 IF Y=0 THEN 2250 2240 PRINT ABS(Y);L$(3); 2250 PRINT L$(15+SGN(Y)) 2280 IF ABS(X3-50)>40 THEN 2300 2290 IF RND(1)<.1 THEN 2860 2300 GOSUB 800 2310 IF F=0 THEN 2340 2320 LET P=1-P 2330 GOTO 740 2340 IF FNG(1)>=10 THEN 740 2350 IF D=4 THEN 2320 2360 LET D=D+1 2370 PRINT "DOWN: ";D;" "; 2380 IF (X1-50)*FNF(1)<40 THEN 2410 2390 PRINT "GOAL TO GO" 2400 GOTO 2420 2410 PRINT "YARDS TO GO: ";10-FNG(1) 2420 PRINT 2430 PRINT 2440 GOTO 860 2450 REM BALL IN END-ZONE 2460 IF X>=100 THEN 2490 2470 LET E=0 2480 GOTO 2500 2490 LET E=1 2500 ON 1+E-F*2+P*4 GOTO 2510,2590,2760,2710,2590,2510,2710,2760 2510 REM SAFETY 2520 LET S(1-P)=S(1-P)+2 2530 PRINT L$(19) 2540 GOSUB 2800 2550 PRINT O$(P);" KICKS OFF FROM ITS 20 YARD LINE." 2560 LET X=20+P*60 2570 LET P=1-P 2580 GOTO 590 2590 REM OFFENSIVE TD 2600 PRINT L$(17);"***" 2610 IF RND(1)>.8 THEN 2680 2620 LET S(P)=S(P)+7 2630 PRINT "KICK IS GOOD." 2640 GOSUB 2800 2650 PRINT O$(P);" KICKS OFF" 2660 LET P=1-P 2670 GOTO 580 2680 PRINT "KICK IS OFF TO THE SIDE" 2690 LET S(P)=S(P)+6 2700 GOTO 2640 2710 REM TOUCHBACK 2720 PRINT L$(18) 2730 LET P=1-P 2740 LET X=20+P*60 2750 GOTO 720 2760 REM DEFENSIVE TD 2770 PRINT L$(17);"FOR ";O$(1-P);"***" 2780 LET P=1-P 2790 GOTO 2600 2800 REM SCORE 2810 PRINT 2820 PRINT "SCORE: ";S(0);" TO ";S(1) 2830 PRINT 2840 PRINT 2850 RETURN 2860 REM PENALTY 2870 LET P3=INT(2*RND(1)) 2880 PRINT O$(P3);" OFFSIDES -- PENALTY OF 5 YARDS." 2890 PRINT 2900 PRINT 2910 IF P3=0 THEN 2980 2920 PRINT "DO YOU ACCEPT THE PENALTY"; 2930 INPUT A$ 2940 IF A$="NO" THEN 2300 2950 IF A$="YES" THEN 3110 2960 PRINT "TYPE 'YES' OR 'NO'"; 2970 GOTO 2930 2980 REM OPPONENT'S STRATEGY ON PENALTY 2990 IF P=1 THEN 3040 3000 IF Y<=0 THEN 3080 3010 IF F<0 THEN 3080 3020 IF FNG(1)<3*D-2 THEN 3080 3030 GOTO 3100 3040 IF Y<=5 THEN 3100 3050 IF F<0 THEN 3100 3060 IF D<4 THEN 3080 3070 IF FNG(1)<10 THEN 3100 3080 PRINT "PENALTY REFUSED." 3090 GOTO 2300 3100 PRINT "PENALTY ACCEPTED." 3110 LET F=0 3120 LET D=D-1 3130 IF P<>P3 THEN 3160 3140 LET X=X3-FNF(1)*5 3150 GOTO 2300 3160 LET X=X3+FNF(1)*5 3170 GOTO 2300 3180 END 1 DIM F(4) 2 PRINT TAB(31);"FUR TRADER" 4 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 6 PRINT: PRINT: PRINT 15 GOSUB 1091 16 LET I=600 17 PRINT "DO YOU WISH TO TRADE FURS?" 18 GOSUB 1402 19 IF B$="YES" THEN 100 20 IF B$="YES " THEN 100 21 STOP 100 PRINT 101 PRINT "YOU HAVE $";I " SAVINGS." 102 PRINT "AND 190 FURS TO BEGIN THE EXPEDITION." 261 LET E1=INT((.15*RND(1)+.95)*10^2+.5)/10^2 262 LET B1=INT((.25*RND(1)+1.00)*10^2+.5)/10^2 300 PRINT 301 PRINT "YOUR 190 FURS ARE DISTRIBUTED AMONG THE FOLLOWING" 302 PRINT "KINDS OF PELTS: MINK, BEAVER, ERMINE AND FOX." 310 GOSUB 1430 315 RESTORE 330 FOR J=1 TO 4 332 READ B$ 333 PRINT 335 PRINT "HOW MANY ";B$;" PELTS DO YOU HAVE"; 338 INPUT F(J) 340 LET F(0)=F(1)+F(2)+F(3)+F(4) 342 IF F(0)=190 THEN 1100 344 IF F(0)>190 THEN 500 348 NEXT J 350 GOTO 1100 500 PRINT 501 PRINT "YOU MAY NOT HAVE THAT MANY FURS." 502 PRINT "DO NOT TRY TO CHEAT. I CAN ADD." 503 PRINT "YOU MUST START AGAIN." 504 GOTO 15 508 PRINT 511 PRINT "DO YOU WANT TO TRADE FURS NEXT YEAR?" 513 GOTO 18 1091 PRINT "YOU ARE THE LEADER OF A FRENCH FUR TRADING EXPEDITION IN " 1092 PRINT "1776 LEAVING THE LAKE ONTARIO AREA TO SELL FURS AND GET" 1093 PRINT "SUPPLIES FOR THE NEXT YEAR. YOU HAVE A CHOICE OF THREE" 1094 PRINT "FORTS AT WHICH YOU MAY TRADE. THE COST OF SUPPLIES" 1095 PRINT "AND THE AMOUNT YOU RECEIVE FOR YOUR FURS WILL DEPEND" 1096 PRINT "ON THE FORT THAT YOU CHOOSE." 1099 RETURN 1100 PRINT "YOU MAY TRADE YOUR FURS AT FORT 1, FORT 2," 1102 PRINT "OR FORT 3. FORT 1 IS FORT HOCHELAGA (MONTREAL)" 1103 PRINT "AND IS UNDER THE PROTECTION OF THE FRENCH ARMY." 1104 PRINT "FORT 2 IS FORT STADACONA (QUEBEC) AND IS UNDER THE" 1105 PRINT "PROTECTION OF THE FRENCH ARMY. HOWEVER, YOU MUST" 1106 PRINT "MAKE A PORTAGE AND CROSS THE LACHINE RAPIDS." 1108 PRINT "FORT 3 IS FORT NEW YORK AND IS UNDER DUTCH CONTROL." 1109 PRINT "YOU MUST CROSS THROUGH IROQUOIS LAND." 1110 PRINT "ANSWER 1, 2, OR 3." 1111 INPUT B 1112 IF B=1 THEN 1120 1113 IF B=2 THEN 1135 1115 IF B=3 THEN 1147 1116 GOTO 1110 1120 PRINT "YOU HAVE CHOSEN THE EASIEST ROUTE. HOWEVER, THE FORT" 1121 PRINT "IS FAR FROM ANY SEAPORT. THE VALUE" 1122 PRINT "YOU RECEIVE FOR YOUR FURS WILL BE LOW AND THE COST" 1123 PRINT "OF SUPPLIES HIGHER THAN AT FORTS STADACONA OR NEW YORK." 1125 GOSUB 1400 1129 IF B$="YES" THEN 1110 1130 GOTO 1160 1135 PRINT "YOU HAVE CHOSEN A HARD ROUTE. IT IS, IN COMPARSION," 1136 PRINT "HARDER THAN THE ROUTE TO HOCHELAGA BUT EASIER THAN" 1137 PRINT "THE ROUTE TO NEW YORK. YOU WILL RECEIVE AN AVERAGE VALUE" 1138 PRINT "FOR YOUR FURS AND THE COST OF YOUR SUPPLIES WILL BE AVERAGE." 1141 GOSUB 1400 1144 IF B$="YES" THEN 1110 1145 GOTO 1198 1147 PRINT "YOU HAVE CHOSEN THE MOST DIFFICULT ROUTE. AT" 1148 PRINT "FORT NEW YORK YOU WILL RECEIVE THE HIGHEST VALUE" 1149 PRINT "FOR YOUR FURS. THE COST OF YOUR SUPPLIES" 1150 PRINT "WILL BE LOWER THAN AT ALL THE OTHER FORTS." 1152 GOSUB 1400 1155 IF B$="YES" THEN 1110 1156 GOTO 1250 1160 LET I=I-160 1169 PRINT 1174 LET M1=INT((.2*RND(1)+.7)*10^2+.5)/10^2 1175 LET E1=INT((.2*RND(1)+.65)*10^2+.5)/10^2 1176 LET B1=INT((.2*RND(1)+.75)*10^2+.5)/10^2 1177 LET D1=INT((.2*RND(1)+.8)*10^2+.5)/10^2 1180 PRINT "SUPPLIES AT FORT HOCHELAGA COST $150.00." 1181 PRINT "YOUR TRAVEL EXPENSES TO HOCHELAGA WERE $10.00." 1190 GOTO 1410 1198 LET I=I-140 1201 PRINT 1205 LET M1=INT((.3*RND(1)+.85)*10^2+.5)/10^2 1206 LET E1=INT((.15*RND(1)+.8)*10^2+.5)/10^2 1207 LET B1=INT((.2*RND(1)+.9)*10^2+.5)/10^2 1209 LET P=INT(10*RND(1))+1 1210 IF P<=2 THEN 1216 1212 IF P<=6 THEN 1224 1213 IF P<=8 THEN 1226 1215 IF P<=10 THEN 1235 1216 LET F(2)=0 1218 PRINT "YOUR BEAVER WERE TOO HEAVY TO CARRY ACROSS" 1219 PRINT "THE PORTAGE. YOU HAD TO LEAVE THE PELTS, BUT FOUND" 1220 PRINT "THEM STOLEN WHEN YOU RETURNED." 1221 GOSUB 1244 1222 GOTO 1414 1224 PRINT "YOU ARRIVED SAFELY AT FORT STADACONA." 1225 GOTO 1239 1226 GOSUB 1430 1230 PRINT "YOUR CANOE UPSET IN THE LACHINE RAPIDS. YOU" 1231 PRINT "LOST ALL YOUR FURS." 1232 GOSUB 1244 1233 GOTO 1418 1235 LET F(4)=0 1237 PRINT "YOUR FOX PELTS WERE NOT CURED PROPERLY." 1238 PRINT "NO ONE WILL BUY THEM." 1239 GOSUB 1244 1240 GOTO 1410 1244 PRINT "SUPPLIES AT FORT STADACONA COST $125.00." 1246 PRINT "YOUR TRAVEL EXPENSES TO STADACONA WERE $15.00." 1248 RETURN 1250 LET I=I-105 1254 PRINT 1260 LET M1=INT((.15*RND(1)+1.05)*10^2+.5)/10^2 1263 LET D1=INT((.25*RND(1)+1.1)*10^2+.5)/10^2 1270 LET P=INT(10*RND(1))+1 1271 IF P<=2 THEN 1281 1272 IF P<=6 THEN 1291 1273 IF P<=8 THEN 1295 1274 IF P<=10 THEN 1306 1281 PRINT "YOU WERE ATTACKED BY A PARTY OF IROQUOIS." 1282 PRINT "ALL PEOPLE IN YOUR TRADING GROUP WERE" 1283 PRINT "KILLED. THIS ENDS THE GAME." 1284 STOP 1291 PRINT "YOU WERE LUCKY. YOU ARRIVED SAFELY" 1292 PRINT "AT FORT NEW YORK." 1293 GOTO 1311 1295 GOSUB 1430 1300 PRINT "YOU NARROWLY ESCAPED AN IROQUOIS RAIDING PARTY." 1301 PRINT "HOWEVER, YOU HAD TO LEAVE ALL YOUR FURS BEHIND." 1303 GOSUB 1320 1304 GOTO 1418 1306 LET B1=B1/2 1307 LET M1=M1/2 1308 PRINT "YOUR MINK AND BEAVER WERE DAMAGED ON YOUR TRIP." 1309 PRINT "YOU RECEIVE ONLY HALF THE CURRENT PRICE FOR THESE FURS." 1311 GOSUB 1320 1312 GOTO 1410 1320 PRINT "SUPPLIES AT NEW YORK COST $80.00." 1321 PRINT "YOUR TRAVEL EXPENSES TO NEW YORK WERE $25.00." 1322 RETURN 1400 PRINT "DO YOU WANT TO TRADE AT ANOTHER FORT?" 1402 PRINT "ANSWER YES OR NO", 1403 INPUT B$ 1404 RETURN 1410 PRINT 1412 PRINT "YOUR BEAVER SOLD FOR $";B1*F(2); 1414 PRINT "YOUR FOX SOLD FOR $";D1*F(4) 1416 PRINT "YOUR ERMINE SOLD FOR $";E1*F(3); 1417 PRINT "YOUR MINK SOLD FOR $";M1*F(1) 1418 LET I=M1*F(1)+B1*F(2)+E1*F(3)+D1*F(4)+I 1420 PRINT 1422 PRINT "YOU NOW HAVE $";I;" INCLUDING YOUR PREVIOUS SAVINGS" 1425 GOTO 508 1430 FOR J=1 TO 4 1432 LET F(J)=0 1434 NEXT J 1436 RETURN 2000 DATA "MINK","BEAVER","ERMINE","FOX" 2046 END 1 PRINT TAB(28);"GAME OF EVEN WINS" 2 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 3 PRINT:PRINT 4 INPUT "DO YOU WANT INSTRUCTIONS (YES OR NO)";A$:PRINT 5 IF A$="NO" THEN 20 6 PRINT "THE GAME IS PLAYED AS FOLLOWS:":PRINT 7 PRINT "AT THE BEGINNING OF THE GAME, A RANDOM NUMBER OF CHIPS ARE" 8 PRINT "PLACED ON THE BOARD. THE NUMBER OF CHIPS ALWAYS STARTS" 9 PRINT "AS AN ODD NUMBER. ON EACH TURN, A PLAYER MUST TAKE ONE," 10 PRINT "TWO, THREE, OR FOUR CHIPS. THE WINNER IS THE PLAYER WHO" 11 PRINT "FINISHES WITH A TOTAL NUMBER OF CHIPS THAT IS EVEN." 12 PRINT "THE COMPUTER STARTS OUT KNOWING ONLY THE RULES OF THE" 13 PRINT "GAME. IT GRADUALLY LEARNS TO PLAY WELL. IT SHOULD BE" 14 PRINT "DIFFICULT TO BEAT THE COMPUTER AFTER TWENTY GAMES IN A ROW." 15 PRINT "TRY IT!!!!": PRINT 16 PRINT "TO QUIT AT ANY TIME, TYPE A '0' AS YOUR MOVE.": PRINT 20 DIM R(1,5) 25 L=0: B=0 30 FOR I=0 TO 5 40 R(1,I)=4 50 R(0,I)=4 60 NEXT I 70 A=0: B=0 90 P=INT((13*RND(1)+9)/2)*2+1 100 IF P=1 THEN 530 110 PRINT "THERE ARE";P;"CHIPS ON THE BOARD." 120 E1=E 130 L1=L 140 E=(A/2-INT(A/2))*2 150 L=INT((P/6-INT(P/6))*6+.5) 160 IF R(E,L)>=P THEN 320 170 M=R(E,L) 180 IF M<=0 THEN 370 190 P=P-M 200 IF M=1 THEN 510 210 PRINT "COMPUTER TAKES";M;"CHIPS LEAVING";P;"... YOUR MOVE"; 220 B=B+M 230 INPUT M 240 M=INT(M) 250 IF M<1 THEN 450 260 IF M>4 THEN 460 270 IF M>P THEN 460 280 IF M=P THEN 360 290 P=P-M 300 A=A+M 310 GOTO 100 320 IF P=1 THEN 550 330 PRINT "COMPUTER TAKES";P;"CHIPS." 340 R(E,L)=P 350 B=B+P 360 IF B/2=INT(B/2) THEN 420 370 PRINT "GAME OVER ... YOU WIN!!!": PRINT 390 IF R(E,L)=1 THEN 480 400 R(E,L)=R(E,L)-1 410 GOTO 70 420 PRINT "GAME OVER ... I WIN!!!": PRINT 430 GOTO 70 450 IF M=0 THEN 570 460 PRINT M;"IS AN ILLEGAL MOVE ... YOUR MOVE"; 470 GOTO 230 480 IF R(E1,L1)=1 THEN 70 490 R(E1,L1)=R(E1,L1)-1 500 GOTO 70 510 PRINT "COMPUTER TAKES 1 CHIP LEAVING";P;"... YOUR MOVE"; 520 GOTO 220 530 PRINT "THERE IS 1 CHIP ON THE BOARD." 540 GOTO 120 550 PRINT "COMPUTER TAKES 1 CHIP." 560 GOTO 340 570 END 1 PRINT TAB(34);"GOLF" 2 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 3 PRINT:PRINT:PRINT 4 PRINT "WELCOME TO THE CREATIVE COMPUTING COUNTRY CLUB," 5 PRINT "AN EIGHTEEN HOLE CHAMPIONSHIP LAYOUT LOCATED A SHORT" 6 PRINT "DISTANCE FROM SCENIC DOWNTOWN MORRISTOWN. THE" 7 PRINT "COMMENTATOR WILL EXPLAIN THE GAME AS YOU PLAY." 8 PRINT "ENJOY YOUR GAME; SEE YOU AT THE 19TH HOLE..." 9 PRINT:PRINT: DIM L(10) 10 G1=18 20 G2=0 30 G3=0 40 A=0 50 N=.8 60 S2=0 70 F=1 80 PRINT "WHAT IS YOUR HANDICAP"; 90 INPUT H:PRINT 100 IF H>30 THEN 470 110 IF H<0 THEN 470 120 PRINT "DIFFICULTIES AT GOLF INCLUDE:" 130 PRINT "0=HOOK, 1=SLICE, 2=POOR DISTANCE, 4=TRAP SHOTS, 5=PUTTING" 140 PRINT "WHICH ONE (ONLY ONE) IS YOUR WORST"; 150 INPUT T:PRINT 160 IF T>5 THEN 120 170 S1=0 210 REM 230 L(0)=0 240 J=0 245 Q=0 250 S2=S2+1 260 K=0 270 IF F=1 THEN 310 290 PRINT "YOUR SCORE ON HOLE";F-1;"WAS";S1 291 GOTO 1750 292 IF S1>P+2 THEN 297 293 IF S1=P THEN 299 294 IF S1=P-1 THEN 301 295 IF S1=P-2 THEN 303 296 GOTO 310 297 PRINT "KEEP YOUR HEAD DOWN." 298 GOTO 310 299 PRINT "A PAR. NICE GOING." 300 GOTO 310 301 PRINT "A BIRDIE." 302 GOTO 310 303 IF P=3 THEN 306 304 PRINT "A GREAT BIG EAGLE." 305 GOTO 310 306 PRINT "A HOLE IN ONE." 310 IF F=19 THEN 1710 315 S1=0 316 PRINT 320 IF S1=0 THEN 1590 330 IF L(0)<1 THEN 1150 340 X=0 350 IF L(0)>5 THEN 1190 360 PRINT "SHOT WENT";D1;"YARDS. IT'S";D2;"YARDS FROM THE CUP." 362 PRINT "BALL IS";INT(O);"YARDS OFF LINE... IN "; 380 GOSUB 400 390 GOTO 620 400 IF L(X)=1 THEN 480 410 IF L(X)=2 THEN 500 420 IF L(X)=3 THEN 520 430 IF L(X)=4 THEN 540 440 IF L(X)=5 THEN 560 450 IF L(X)=6 THEN 580 460 PRINT "OUT OF BOUNDS." 465 GOTO 1690 470 PRINT "PGA HANDICAPS RANGE FROM 0 TO 30." 472 GOTO 80 480 PRINT "FAIRWAY." 490 GOTO 1690 500 PRINT "ROUGH." 510 GOTO 1690 520 PRINT "TREES." 530 GOTO 1690 540 PRINT "ADJACENT FAIRWAY." 550 GOTO 1690 560 PRINT "TRAP." 570 GOTO 1690 580 PRINT "WATER." 590 GOTO 1690 620 IF A=1 THEN 629 621 PRINT "SELECTION OF CLUBS" 622 PRINT "YARDAGE DESIRED SUGGESTED CLUBS" 623 PRINT "200 TO 280 YARDS 1 TO 4" 624 PRINT "100 TO 200 YARDS 19 TO 13" 625 PRINT " 0 TO 100 YARDS 29 TO 23" 626 A=1 629 PRINT "WHAT CLUB DO YOU CHOOSE"; 630 INPUT C 632 PRINT 635 IF C<1 THEN 690 637 IF C>29 THEN 690 640 IF C>4 THEN 710 650 IF L(0)<=5 THEN 740 660 IF C=14 THEN 740 665 IF C=23 THEN 740 670 GOTO 690 680 S1=S1-1 690 PRINT "THAT CLUB IS NOT IN THE BAG." 693 PRINT 700 GOTO 620 710 IF C<12 THEN 690 720 C=C-6 730 GOTO 650 740 S1=S1+1 741 W=1 742 IF C>13 THEN 960 746 IF INT(F/3)=F/3 THEN 952 752 IF C<4 THEN 756 754 GOTO 760 756 IF L(0)=2 THEN 862 760 IF S1>7 THEN 867 770 D1=INT(((30-H)*2.5+187-((30-H)*.25+15)*C/2)+25*RND(1)) 780 D1=INT(D1*W) 800 IF T=2 THEN 1170 830 O=(RND(1)/.8)*(2*H+16)*ABS(TAN(D1*.0035)) 840 D2=INT(SQR(O^2+ABS(D-D1)^2)) 850 IF D-D1<0 THEN 870 860 GOTO 890 862 PRINT "YOU DUBBED IT." 864 D1=35 866 GOTO 830 867 IF D<200 THEN 1300 868 GOTO 770 870 IF D2<20 THEN 890 880 PRINT "TOO MUCH CLUB. YOU'RE PAST THE HOLE." 890 B=D 900 D=D2 910 IF D2>27 THEN 1020 920 IF D2>20 THEN 1100 930 IF D2>.5 THEN 1120 940 L(0)=9 950 GOTO 1470 952 IF S2+Q+(10*(F-1)/18)<(F-1)*(72+((H+1)/.85))/18 THEN 956 954 GOTO 752 956 Q=Q+1 957 IF S1/2<>INT(S1/2) THEN 1011 958 GOTO 862 960 PRINT "NOW GAUGE YOUR DISTANCE BY A PERCENTAGE (1 TO 100)" 961 PRINT "OF A FULL SWING"; 970 INPUT W: W=W/100 972 PRINT 980 IF W>1 THEN 680 985 IF L(0)=5 THEN 1280 990 IF C=14 THEN 760 1000 C=C-10 1010 GOTO 760 1011 IF D<95 THEN 862 1012 PRINT "BALL HIT TREE - BOUNCED INTO ROUGH";D-75;"YARDS FROM HOLE." 1014 D=D-75 1018 GOTO 620 1020 IF O<30 THEN 1150 1022 IF J>0 THEN 1150 1030 IF T>0 THEN 1070 1035 S9=(S2+1)/15 1036 IF INT(S9)=S9 THEN 1075 1040 PRINT "YOU HOOKED- "; 1050 L(0)=L(2) 1055 IF O>45 THEN 1092 1060 GOTO 320 1070 S9=(S2+1)/15 1071 IF INT(S9)=S9 THEN 1040 1075 PRINT "YOU SLICED- "; 1080 L(0)=L(1) 1090 GOTO 1055 1092 PRINT "BADLY." 1094 GOTO 320 1100 L(0)=5 1110 GOTO 320 1120 L(0)=8 1130 D2=INT(D2*3) 1140 GOTO 1380 1150 L(0)=1 1160 GOTO 320 1170 D1=INT(.85*D1) 1180 GOTO 830 1190 IF L(0)>6 THEN 1260 1200 PRINT "YOUR SHOT WENT INTO THE WATER." 1210 S1=S1+1 1220 PRINT "PENALTY STROKE ASSESSED. HIT FROM PREVIOUS LOCATION." 1230 J=J+1 1240 L(0)=1 1242 D=B 1250 GOTO 620 1260 PRINT "YOUR SHOT WENT OUT OF BOUNDS." 1270 GOTO 1210 1280 IF T=3 THEN 1320 1300 D2=1+(3*INT((80/(40-H))*RND(1))) 1310 GOTO 1380 1320 IF RND(1)>N THEN 1360 1330 N=N*.2 1340 PRINT "SHOT DUBBED, STILL IN TRAP." 1350 GOTO 620 1360 N=.8 1370 GOTO 1300 1380 PRINT "ON GREEN,";D2;"FEET FROM THE PIN." 1381 PRINT "CHOOSE YOUR PUTT POTENCY (1 TO 13):"; 1400 INPUT I 1410 S1=S1+1 1420 IF S1+1-P>(H*.072)+2 THEN 1470 1425 IF K>2 THEN 1470 1428 K=K+1 1430 IF T=4 THEN 1530 1440 D2=D2-I*(4+2*RND(1))+1.5 1450 IF D2<-2 THEN 1560 1460 IF D2>2 THEN 1500 1470 PRINT "YOU HOLED IT." 1472 PRINT 1480 F=F+1 1490 GOTO 230 1500 PRINT "PUTT SHORT." 1505 D2=INT(D2) 1510 GOTO 1380 1530 D2=D2-I*(4+1*RND(1))+1 1550 GOTO 1450 1560 PRINT "PASSED BY CUP." 1570 D2=-D2 1580 GOTO 1505 1590 READ D,P,L(1),L(2) 1595 PRINT 1600 PRINT "YOU ARE AT THE TEE OFF HOLE";F;"DISTANCE";D;"YARDS, PAR";P 1605 G3=G3+P 1620 PRINT "ON YOUR RIGHT IS "; 1630 X=1 1640 GOSUB 400 1650 PRINT "ON YOUR LEFT IS "; 1660 X=2 1670 GOSUB 400 1680 GOTO 620 1690 RETURN 1700 DATA 361,4,4,2,389,4,3,3,206,3,4,2,500,5,7,2 1702 DATA 408,4,2,4,359,4,6,4,424,4,4,2,388,4,4,4 1704 DATA 196,3,7,2,400,4,7,2,560,5,7,2,132,3,2,2 1706 DATA 357,4,4,4,294,4,2,4,475,5,2,3,375,4,4,2 1708 DATA 180,3,6,2,550,5,6,6 1710 PRINT 1750 G2=G2+S1 1760 PRINT "TOTAL PAR FOR";F-1;"HOLES IS";G3;" YOUR TOTAL IS";G2 1761 IF G1=F-1 THEN 1770 1765 GOTO 292 1770 END 2 PRINT TAB(33);"GOMOKO" 4 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 6 PRINT:PRINT:PRINT 8 DIM A(19,19) 10 PRINT "WELCOME TO THE ORIENTAL GAME OF GOMOKO." 20 PRINT: PRINT "THE GAME IS PLAYED ON AN N BY N GRID OF A SIZE" 30 PRINT "THAT YOU SPECIFY. DURING YOUR PLAY, YOU MAY COVER ONE GRID" 40 PRINT "INTERSECTION WITH A MARKER. THE OBJECT OF THE GAME IS TO GET" 50 PRINT "5 ADJACENT MARKERS IN A ROW -- HORIZONTALLY, VERTICALLY, OR" 60 PRINT "DIAGONALLY. ON THE BOARD DIAGRAM, YOUR MOVES ARE MARKED" 70 PRINT "WITH A '1' AND THE COMPUTER MOVES WITH A '2'." 80 PRINT: PRINT "THE COMPUTER DOES NOT KEEP TRACK OF WHO HAS WON." 90 PRINT "TO END THE GAME, TYPE -1,-1 FOR YOUR MOVE.": PRINT 110 PRINT "WHAT IS YOUR BOARD SIZE (MIN 7/ MAX 19)";: INPUT N 115 IF N>6 THEN 117 116 GOTO 120 117 IF N<20 THEN 210 120 PRINT "I SAID, THE MINIMUM IS 7, THE MAXIMUM IS 19.": GOTO 110 210 FOR I=1 TO N:FOR J=1 TO N: A(I,J)=0: NEXT J: NEXT I 300 PRINT: PRINT "WE ALTERNATE MOVES. YOU GO FIRST...": PRINT 310 PRINT "YOUR PLAY (I,J)";: INPUT I,J 315 PRINT 320 IF I=-1 THEN 980 330 X=I: Y=J: GOSUB 910: IF L=1 THEN 410 340 PRINT "ILLEGAL MOVE. TRY AGAIN...": GOTO 310 410 IF A(I,J)=0 THEN 440 420 PRINT "SQUARE OCCUPIED. TRY AGAIN...": GOTO 310 440 A(I,J)=1 500 REM *** COMPUTER TRIES AN INTELLIGENT MOVE *** 510 FOR E=-1 TO 1: FOR F=-1 TO 1: IF E+F-E*F=0 THEN 590 540 X=I+F: Y=J+F: GOSUB 910 570 IF L=0 THEN 590 580 IF A(X,Y)=1 THEN 710 590 NEXT F: NEXT E 600 REM *** COMPUTER TRIES A RANDOM MOVE *** 610 X=INT(N*RND(1)+1): Y=INT(N*RND(1)+1): GOSUB 910: IF L=0 THEN 610 650 IF A(X,Y)<>0 THEN 610 660 A(X,Y)=2: GOSUB 810: GOTO 310 710 X=I-E: Y=J-F: GOSUB 910 750 IF L=0 THEN 610 760 GOTO 650 800 REM *** PRINT THE BOARD *** 810 FOR I=1 TO N: FOR J=1 TO N: PRINT A(I,J); 840 NEXT J: PRINT: NEXT I: PRINT: RETURN 910 L=1: IF X<1 THEN 970 920 IF X>N THEN 970 930 IF Y<1 THEN 970 940 IF Y>N THEN 970 950 RETURN 970 L=0: RETURN 980 PRINT: PRINT "THANKS FOR THE GAME!!" 985 PRINT "PLAY AGAIN (1 FOR YES, 0 FOR NO)";: INPUT Q 990 IF Q=1 THEN 110 999 END 1 PRINT TAB(33);"GUESS" 2 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 3 PRINT:PRINT:PRINT 4 PRINT "THIS IS A NUMBER GUESSING GAME. I'LL THINK" 5 PRINT "OF A NUMBER BETWEEN 1 AND ANY LIMIT YOU WANT." 6 PRINT "THEN YOU HAVE TO GUESS WHAT IT IS." 7 PRINT 8 PRINT "WHAT LIMIT DO YOU WANT"; 9 INPUT L 10 PRINT 11 L1=INT(LOG(L)/LOG(2))+1 12 PRINT "I'M THINKING OF A NUMBER BETWEEN 1 AND";L 13 G=1 14 PRINT "NOW YOU TRY TO GUESS WHAT IT IS." 15 M=INT(L*RND(1)+1) 20 INPUT N 21 IF N>0 THEN 25 22 GOSUB 70 23 GOTO 1 25 IF N=M THEN 50 30 G=G+1 31 IF N>M THEN 40 32 PRINT "TOO LOW. TRY A BIGGER ANSWER." 33 GOTO 20 40 PRINT "TOO HIGH. TRY A SMALLER ANSWER." 42 GOTO 20 50 PRINT "THAT'S IT! YOU GOT IT IN";G;"TRIES." 52 IF G<L1 THEN 58 54 IF G=L1 THEN 60 56 PRINT "YOU SHOULD HAVE BEEN ABLE TO GET IT IN ONLY";L1 57 GOTO 65 58 PRINT "VERY "; 60 PRINT "GOOD." 65 GOSUB 70 66 GOTO 12 70 FOR H=1 TO 5 71 PRINT 72 NEXT H 73 RETURN 99 END 10 PRINT TAB(30);"GUNNER" 20 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 30 PRINT:PRINT:PRINT 130 PRINT "YOU ARE THE OFFICER-IN-CHARGE, GIVING ORDERS TO A GUN" 140 PRINT "CREW, TELLING THEM THE DEGREES OF ELEVATION YOU ESTIMATE" 150 PRINT "WILL PLACE A PROJECTILE ON TARGET. A HIT WITHIN 100 YARDS" 160 PRINT "OF THE TARGET WILL DESTROY IT." : PRINT 170 R=INT(40000*RND(1)+20000) 180 PRINT "MAXIMUM RANGE OF YOUR GUN IS";R;" YARDS." 185 Z=0 190 PRINT 195 S1=0 200 T=INT(R*(.1+.8*RND(1))) 210 S=0 220 GOTO 370 230 PRINT "MINIMUM ELEVATION IS ONE DEGREE." 240 GOTO 390 250 PRINT "MAXIMUM ELEVATION IS 89 DEGREES." 260 GOTO 390 270 PRINT "OVER TARGET BY ";ABS(E);"YARDS." 280 GOTO 390 290 PRINT "SHORT OF TARGET BY "ABS(E);"YARDS." 300 GOTO 390 320 PRINT "*** TARGET DESTROYED *** ";S;"ROUNDS OF AMMUNITION EXPENDED." 325 S1=S1+S 330 IF Z=4 THEN 490 340 Z=Z+1 345 PRINT 350 PRINT "THE FORWARD OBSERVER HAS SIGHTED MORE ENEMY ACTIVITY..." 360 GOTO 200 370 PRINT "DISTANCE TO THE TARGET IS "T;" YARDS." 380 PRINT 390 PRINT 400 INPUT "ELEVATION";B 420 IF B>89 THEN 250 430 IF B<1 THEN 230 440 S=S+1 442 IF S<6 THEN 450 444 PRINT:PRINT "BOOM !!!! YOU HAVE JUST BEEN DESTROYED "; 446 PRINT "BY THE ENEMY." : PRINT : PRINT : PRINT : GOTO 495 450 B2=2*B/57.3 : I=R*SIN(B2) : X=T-I : E=INT(X) 460 IF ABS(E)<100 THEN 320 470 IF E>100 THEN 290 480 GOTO 270 490 PRINT : PRINT : PRINT "TOTAL ROUNDS EXPENDED WERE:";S1 492 IF S1>18 THEN 495 493 PRINT "NICE SHOOTING !!" : GOTO 500 495 PRINT "BETTER GO BACK TO FORT SILL FOR REFRESHER TRAINING!" 500 PRINT : INPUT "TRY AGAIN (Y OR N)";Z$ 510 IF Z$="Y" THEN 170 520 PRINT:PRINT "OK. RETURN TO BASE CAMP." 999 END 10 PRINT TAB(32);"HAMURABI" 20 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 30 PRINT:PRINT:PRINT 80 PRINT "TRY YOUR HAND AT GOVERNING ANCIENT SUMERIA" 90 PRINT "FOR A TEN-YEAR TERM OF OFFICE.":PRINT 95 D1=0: P1=0 100 Z=0: P=95:S=2800: H=3000: E=H-S 110 Y=3: A=H/Y: I=5: Q=1 210 D=0 215 PRINT:PRINT:PRINT "HAMURABI: I BEG TO REPORT TO YOU,": Z=Z+1 217 PRINT "IN YEAR";Z;",";D;"PEOPLE STARVED,";I;"CAME TO THE CITY," 218 P=P+I 227 IF Q>0 THEN 230 228 P=INT(P/2) 229 PRINT "A HORRIBLE PLAGUE STRUCK! HALF THE PEOPLE DIED." 230 PRINT "POPULATION IS NOW";P 232 PRINT "THE CITY NOW OWNS ";A;"ACRES." 235 PRINT "YOU HARVESTED";Y;"BUSHELS PER ACRE." 250 PRINT "THE RATS ATE";E;"BUSHELS." 260 PRINT "YOU NOW HAVE ";S;"BUSHELS IN STORE.": PRINT 270 IF Z=11 THEN 860 310 C=INT(10*RND(1)): Y=C+17 312 PRINT "LAND IS TRADING AT";Y;"BUSHELS PER ACRE." 320 PRINT "HOW MANY ACRES DO YOU WISH TO BUY"; 321 INPUT Q: IF Q<0 THEN 850 322 IF Y*Q<=S THEN 330 323 GOSUB 710 324 GOTO 320 330 IF Q=0 THEN 340 331 A=A+Q: S=S-Y*Q: C=0 334 GOTO 400 340 PRINT "HOW MANY ACRES DO YOU WISH TO SELL"; 341 INPUT Q: IF Q<0 THEN 850 342 IF Q<A THEN 350 343 GOSUB 720 344 GOTO 340 350 A=A-Q: S=S+Y*Q: C=0 400 PRINT 410 PRINT "HOW MANY BUSHELS DO YOU WISH TO FEED YOUR PEOPLE"; 411 INPUT Q 412 IF Q<0 THEN 850 418 REM *** TRYING TO USE MORE GRAIN THAN IS IN SILOS? 420 IF Q<=S THEN 430 421 GOSUB 710 422 GOTO 410 430 S=S-Q: C=1: PRINT 440 PRINT "HOW MANY ACRES DO YOU WISH TO PLANT WITH SEED"; 441 INPUT D: IF D=0 THEN 511 442 IF D<0 THEN 850 444 REM *** TRYING TO PLANT MORE ACRES THAN YOU OWN? 445 IF D<=A THEN 450 446 GOSUB 720 447 GOTO 440 449 REM *** ENOUGH GRAIN FOR SEED? 450 IF INT(D/2)<=S THEN 455 452 GOSUB 710 453 GOTO 440 454 REM *** ENOUGH PEOPLE TO TEND THE CROPS? 455 IF D<10*P THEN 510 460 PRINT "BUT YOU HAVE ONLY";P;"PEOPLE TO TEND THE FIELDS! NOW THEN," 470 GOTO 440 510 S=S-INT(D/2) 511 GOSUB 800 512 REM *** A BOUNTIFUL HARVEST! 515 Y=C: H=D*Y: E=0 521 GOSUB 800 522 IF INT(C/2)<>C/2 THEN 530 523 REM *** RATS ARE RUNNING WILD!! 525 E=INT(S/C) 530 S=S-E+H 531 GOSUB 800 532 REM *** LET'S HAVE SOME BABIES 533 I=INT(C*(20*A+S)/P/100+1) 539 REM *** HOW MANY PEOPLE HAD FULL TUMMIES? 540 C=INT(Q/20) 541 REM *** HORROS, A 15% CHANCE OF PLAGUE 542 Q=INT(10*(2*RND(1)-.3)) 550 IF P<C THEN 210 551 REM *** STARVE ENOUGH FOR IMPEACHMENT? 552 D=P-C: IF D>.45*P THEN 560 553 P1=((Z-1)*P1+D*100/P)/Z 555 P=C: D1=D1+D: GOTO 215 560 PRINT: PRINT "YOU STARVED";D;"PEOPLE IN ONE YEAR!!!" 565 PRINT "DUE TO THIS EXTREME MISMANAGEMENT YOU HAVE NOT ONLY" 566 PRINT "BEEN IMPEACHED AND THROWN OUT OF OFFICE BUT YOU HAVE" 567 PRINT "ALSO BEEN DECLARED NATIONAL FINK!!!!": GOTO 990 710 PRINT "HAMURABI: THINK AGAIN. YOU HAVE ONLY" 711 PRINT S;"BUSHELS OF GRAIN. NOW THEN," 712 RETURN 720 PRINT "HAMURABI: THINK AGAIN. YOU OWN ONLY";A;"ACRES. NOW THEN," 730 RETURN 800 C=INT(RND(1)*5)+1 801 RETURN 850 PRINT: PRINT "HAMURABI: I CANNOT DO WHAT YOU WISH." 855 PRINT "GET YOURSELF ANOTHER STEWARD!!!!!" 857 GOTO 990 860 PRINT "IN YOUR 10-YEAR TERM OF OFFICE,";P1;"PERCENT OF THE" 862 PRINT "POPULATION STARVED PER YEAR ON THE AVERAGE, I.E. A TOTAL OF" 865 PRINT D1;"PEOPLE DIED!!": L=A/P 870 PRINT "YOU STARTED WITH 10 ACRES PER PERSON AND ENDED WITH" 875 PRINT L;"ACRES PER PERSON.": PRINT 880 IF P1>33 THEN 565 885 IF L<7 THEN 565 890 IF P1>10 THEN 940 892 IF L<9 THEN 940 895 IF P1>3 THEN 960 896 IF L<10 THEN 960 900 PRINT "A FANTASTIC PERFORMANCE!!! CHARLEMANGE, DISRAELI, AND" 905 PRINT "JEFFERSON COMBINED COULD NOT HAVE DONE BETTER!":GOTO 990 940 PRINT "YOUR HEAVY-HANDED PERFORMANCE SMACKS OF NERO AND IVAN IV." 945 PRINT "THE PEOPLE (REMIANING) FIND YOU AN UNPLEASANT RULER, AND," 950 PRINT "FRANKLY, HATE YOUR GUTS!!":GOTO 990 960 PRINT "YOUR PERFORMANCE COULD HAVE BEEN SOMEWHAT BETTER, BUT" 965 PRINT "REALLY WASN'T TOO BAD AT ALL. ";INT(P*.8*RND(1));"PEOPLE" 970 PRINT "WOULD DEARLY LIKE TO SEE YOU ASSASSINATED BUT WE ALL HAVE OUR" 975 PRINT "TRIVIAL PROBLEMS." 990 PRINT: FOR N=1 TO 10: PRINT CHR$(7);: NEXT N 995 PRINT "SO LONG FOR NOW.": PRINT 999 END 10 PRINT TAB(32);"HANGMAN" 20 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 25 PRINT:PRINT:PRINT 30 DIM P$(12,12),L$(20),D$(20),N$(26),U(50) 40 C=1: N=50 50 FOR I=1 TO 20: D$(I)="-": NEXT I: M=0 60 FOR I=1 TO 26: N$(I)="": NEXT I 70 FOR I=1 TO 12: FOR J=1 TO 12: P$(I,J)=" ": NEXT J: NEXT I 80 FOR I=1 TO 12: P$(I,1)="X": NEXT I 90 FOR I=1 TO 7: P$(1,I)="X": NEXT: P$(2,7)="X" 95 IF C<N THEN 100 97 PRINT "YOU DID ALL THE WORDS!!": STOP 100 Q=INT(N*RND(1))+1 110 IF U(Q)=1 THEN 100 115 U(Q)=1: C=C+1: RESTORE: T1=0 150 FOR I=1 TO Q: READ A$: NEXT I 160 L=LEN(A$): FOR I=1 TO LEN(A$): L$(I)=MID$(A$,I,1): NEXT I 170 PRINT "HERE ARE THE LETTERS YOU USED:" 180 FOR I=1 TO 26: PRINT N$(I);: IF N$(I+1)="" THEN 200 190 PRINT ",";: NEXT I 200 PRINT: PRINT: FOR I=1 TO L: PRINT D$(I);: NEXT I: PRINT: PRINT 210 INPUT "WHAT IS YOUR GUESS";G$: R=0 220 FOR I=1 TO 26: IF N$(I)="" THEN 250 230 IF G$=N$(I) THEN PRINT "YOU GUESSED THAT LETTER BEFORE!": GOTO 170 240 NEXT I: PRINT "PROGRAM ERROR. RUN AGAIN.": STOP 250 N$(I)=G$: T1=T1+1 260 FOR I=1 TO L: IF L$(I)=G$ THEN 280 270 NEXT I: IF R=0 THEN 290 275 GOTO 300 280 D$(I)=G$: R=R+1: GOTO 270 290 M=M+1: GOTO 400 300 FOR I=1 TO L: IF D$(I)="-" THEN 320 310 NEXT I: GOTO 390 320 PRINT: FOR I=1 TO L: PRINT D$(I);: NEXT I: PRINT: PRINT 330 INPUT "WHAT IS YOUR GUESS FOR THE WORD";B$ 340 IF A$=B$ THEN 360 350 PRINT "WRONG. TRY ANOTHER LETTER.": PRINT: GOTO 170 360 PRINT "RIGHT!! IT TOOK YOU";T1;"GUESSES!" 370 INPUT "WANT ANOTHER WORD";W$: IF W$="YES" THEN 50 380 PRINT: PRINT "IT'S BEEN FUN! BYE FOR NOW.": GOTO 999 390 PRINT "YOU FOUND THE WORD!": GOTO 370 400 PRINT: PRINT: PRINT"SORRY, THAT LETTER ISN'T IN THE WORD." 410 ON M GOTO 415,420,425,430,435,440,445,450,455,460 415 PRINT "FIRST, WE DRAW A HEAD": GOTO 470 420 PRINT "NOW WE DRAW A BODY.": GOTO 470 425 PRINT "NEXT WE DRAW AN ARM.": GOTO 470 430 PRINT "THIS TIME IT'S THE OTHER ARM.": GOTO 470 435 PRINT "NOW, LET'S DRAW THE RIGHT LEG.": GOTO 470 440 PRINT "THIS TIME WE DRAW THE LEFT LEG.": GOTO 470 445 PRINT "NOW WE PUT UP A HAND.": GOTO 470 450 PRINT "NEXT THE OTHER HAND.": GOTO 470 455 PRINT "NOW WE DRAW ONE FOOT": GOTO 470 460 PRINT "HERE'S THE OTHER FOOT -- YOU'RE HUNG!!" 470 ON M GOTO 480,490,500,510,520,530,540,550,560,570 480 P$(3,6)="-": P$(3,7)="-": P$(3,8)="-": P$(4,5)="(": P$(4,6)="." 481 P$(4,8)=".":P$(4,9)=")":P$(5,6)="-":P$(5,7)="-":P$(5,8)="-" 482 GOTO 580 490 FOR I=6 TO 9: P$(I,7)="X": NEXT I: GOTO 580 500 FOR I=4 TO 7: P$(I,I-1)="\": NEXT I: GOTO 580 510 P$(4,11)="/": P$(5,10)="/": P$(6,9)="/": P$(7,8)="/": GOTO 580 520 P$(10,6)="/": P$(11,5)="/": GOTO 580 530 P$(10,8)="\": P$(11,9)="\": GOTO 580 540 P$(3,11)="\": GOTO 580 550 P$(3,3)="/": GOTO 580 560 P$(12,10)="\": P$(12,11)="-": GOTO 580 570 P$(12,3)="-": P$(12,4)="/" 580 FOR I=1 TO 12: FOR J=1 TO 12: PRINT P$(I,J);: NEXT J 590 PRINT: NEXT I: PRINT: PRINT: IF M<>10 THEN 170 600 PRINT "SORRY, YOU LOSE. THE WORD WAS ";A$ 610 PRINT "YOU MISSED THAT ONE. DO YOU ";: GOTO 370 620 INPUT "TYPE YES OR NO";Y$: IF LEFT$(Y$,1)="Y" THEN 50 700 DATA "GUM","SIN","FOR","CRY","LUG","BYE","FLY" 710 DATA "UGLY","EACH","FROM","WORK","TALK","WITH","SELF" 720 DATA "PIZZA","THING","FEIGN","FIEND","ELBOW","FAULT","DIRTY" 730 DATA "BUDGET","SPIRIT","QUAINT","MAIDEN","ESCORT","PICKAX" 740 DATA "EXAMPLE","TENSION","QUININE","KIDNEY","REPLICA","SLEEPER" 750 DATA "TRIANGLE","KANGAROO","MAHOGANY","SERGEANT","SEQUENCE" 760 DATA "MOUSTACHE","DANGEROUS","SCIENTIST","DIFFERENT","QUIESCENT" 770 DATA "MAGISTRATE","ERRONEOUSLY","LOUDSPEAKER","PHYTOTOXIC" 780 DATA "MATRIMONIAL","PARASYMPATHOMIMETIC","THIGMOTROPISM" 990 PRINT "BYE NOW" 999 END 2 PRINT TAB(33);"HELLO" 4 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 6 PRINT: PRINT: PRINT 10 PRINT "HELLO. MY NAME IS CREATIVE COMPUTER." 20 PRINT: PRINT: INPUT "WHAT'S YOUR NAME";N$: PRINT 30 PRINT "HI THERE, ";N$;", ARE YOU ENJOYING YOURSELF HERE"; 40 INPUT B$: PRINT 50 IF B$="YES" THEN 70 55 IF B$="NO" THEN 80 60 PRINT N$;", I DON'T UNDERSTAND YOUR ANSWER OF '";B$;"'." 65 PRINT "PLEASE ANSWER 'YES' OR 'NO'. DO YOU LIKE IT HERE";: GOTO 40 70 PRINT "I'M GLAD TO HEAR THAT, ";N$;".": PRINT 75 GOTO 100 80 PRINT "OH, I'M SORRY TO HEAR THAT, ";N$;". MAYBE WE CAN" 85 PRINT "BRIGHTEN UP YOUR VISIT A BIT." 100 PRINT 105 PRINT "SAY, ";N$;", I CAN SOLVE ALL KINDS OF PROBLEMS EXCEPT" 110 PRINT "THOSE DEALING WITH GREECE. WHAT KIND OF PROBLEMS DO" 120 PRINT "YOU HAVE (ANSWER SEX, HEALTH, MONEY, OR JOB)"; 125 INPUT C$ 126 PRINT 130 IF C$="SEX" THEN 200 132 IF C$="HEALTH" THEN 180 134 IF C$="MONEY" THEN 160 136 IF C$="JOB" THEN 145 138 PRINT "OH, ";N$;", YOUR ANSWER OF ";C$;" IS GREEK TO ME." 140 GOTO 250 145 PRINT "I CAN SYMPATHIZE WITH YOU ";N$;". I HAVE TO WORK" 148 PRINT "VERY LONG HOURS FOR NO PAY -- AND SOME OF MY BOSSES" 150 PRINT "REALLY BEAT ON MY KEYBOARD. MY ADVICE TO YOU, ";N$;"," 153 PRINT "IS TO OPEN A RETAIL COMPUTER STORE. IT'S GREAT FUN." 155 GOTO 250 160 PRINT "SORRY, ";N$;", I'M BROKE TOO. WHY DON'T YOU SELL" 162 PRINT "ENCYCLOPEADIAS OR MARRY SOMEONE RICH OR STOP EATING" 164 PRINT "SO YOU WON'T NEED SO MUCH MONEY?" 170 GOTO 250 180 PRINT "MY ADVICE TO YOU ";N$;" IS:" 185 PRINT " 1. TAKE TWO ASPRIN" 188 PRINT " 2. DRINK PLENTY OF FLUIDS (ORANGE JUICE, NOT BEER!)" 190 PRINT " 3. GO TO BED (ALONE)" 195 GOTO 250 200 INPUT "IS YOUR PROBLEM TOO MUCH OR TOO LITTLE";D$: PRINT 210 IF D$="TOO MUCH" THEN 220 212 IF D$="TOO LITTLE" THEN 230 215 PRINT "DON'T GET ALL SHOOK, ";N$;", JUST ANSWER THE QUESTION" 217 INPUT "WITH 'TOO MUCH' OR 'TOO LITTLE'. WHICH IS IT";D$:GOTO 210 220 PRINT "YOU CALL THAT A PROBLEM?!! I SHOULD HAVE SUCH PROBLEMS!" 225 PRINT "IF IT BOTHERS YOU, ";N$;", TAKE A COLD SHOWER." 228 GOTO 250 230 PRINT "WHY ARE YOU HERE IN SUFFERN, ";N$;"? YOU SHOULD BE" 235 PRINT "IN TOKYO OR NEW YORK OR AMSTERDAM OR SOMEPLACE WITH SOME" 240 PRINT "REAL ACTION." 250 PRINT 255 PRINT "ANY MORE PROBLEMS YOU WANT SOLVED, ";N$; 260 INPUT E$: PRINT 270 IF E$="YES" THEN 280 273 IF E$="NO" THEN 300 275 PRINT "JUST A SIMPLE 'YES' OR 'NO' PLEASE, ";N$;"." 277 GOTO 255 280 PRINT "WHAT KIND (SEX, MONEY, HEALTH, JOB)"; 282 GOTO 125 300 PRINT 302 PRINT "THAT WILL BE $5.00 FOR THE ADVICE, ";N$;"." 305 PRINT "PLEASE LEAVE THE MONEY ON THE TERMINAL." 307 FOR I=1 TO 2000: NEXT I 310 PRINT: PRINT: PRINT 315 PRINT "DID YOU LEAVE THE MONEY"; 320 INPUT G$: PRINT 325 IF G$="YES" THEN 350 330 IF G$="NO" THEN 370 335 PRINT "YOUR ANSWER OF '";G$;"' CONFUSES ME, ";N$;"." 340 PRINT "PLEASE RESPOND WITH 'YES' OR 'NO'.": GOTO 315 350 PRINT "HEY, ";N$;"??? YOU LEFT NO MONEY AT ALL!" 355 PRINT "YOU ARE CHEATING ME OUT OF MY HARD-EARNED LIVING." 360 PRINT:PRINT "WHAT A RIP OFF, ";N$;"!!!":PRINT 365 GOTO 385 370 PRINT "THAT'S HONEST, ";N$;", BUT HOW DO YOU EXPECT" 375 PRINT "ME TO GO ON WITH MY PSYCHOLOGY STUDIES IF MY PATIENTS" 380 PRINT "DON'T PAY THEIR BILLS?" 385 PRINT:PRINT "TAKE A WALK, ";N$;".":PRINT:PRINT:GOTO 999 390 PRINT "NICE MEETING YOU, ";N$;", HAVE A NICE DAY." 400 REM 999 END 1 PRINT TAB(32);"HEXAPAWN" 2 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 3 PRINT:PRINT:PRINT 4 REM HEXAPAWN: INTERPRETATION OF HEXAPAWN GAME AS PRESENTED IN 5 REM MARTIN GARDNER'S "THE UNEXPECTED HANGING AND OTHER MATHEMATIC- 6 REM AL DIVERSIONS", CHAPTER EIGHT: A MATCHBOX GAME-LEARNING MACHINE 7 REM ORIGINAL VERSION FOR H-P TIMESHARE SYSTEM BY R.A. KAAPKE 5/5/76 8 REM INSTRUCTIONS BY JEFF DALTON 9 REM CONVERSION TO MITS BASIC BY STEVE NORTH 10 DIM B(19,9),M(19,4),S(9),P$(3) 15 W=0: L=0 20 DEF FNR(X)=-3*(X=1)-(X=3)-4*(X=6)-6*(X=4)-7*(X=9)-9*(X=7)+FNS(X) 25 DEF FNS(X)=-X*(X=2 OR X=5 OR X=8) 30 DEF FNM(Y)=Y-INT(Y/10)*10 35 P$="X.O" 40 FOR I=1 TO 19: FOR J=1 TO 9: READ B(I,J): NEXT J: NEXT I 45 FOR I=1 TO 19: FOR J=1 TO 4: READ M(I,J): NEXT J: NEXT I 50 PRINT "INSTRUCTIONS (Y-N)"; 60 INPUT A$ 70 A$=LEFT$(A$,1) 80 IF A$="Y" THEN 2000 90 IF A$<>"N" THEN 50 100 X=0: Y=0 111 S(4)=0: S(5)=0: S(6)=0 112 S(1)=-1: S(2)=-1: S(3)=-1 113 S(7)=1: S(8)=1: S(9)=1 115 GOSUB 1000 120 PRINT "YOUR MOVE"; 121 INPUT M1,M2 122 IF M1=INT(M1)AND M2=INT(M2)AND M1>0 AND M1<10 AND M2>0 AND M2<10 THEN 130 123 PRINT "ILLEGAL CO-ORDINATES." 124 GOTO 120 130 IF S(M1)=1 THEN 150 140 PRINT "ILLEGAL MOVE.": GOTO 120 150 IF S(M2)=1 THEN 140 160 IF M2-M1<>-3 AND S(M2)<>-1 THEN 140 170 IF M2>M1 THEN 140 180 IF M2-M1=-3 AND (S(M2)<>0) THEN 140 185 IF M2-M1<-4 THEN 140 186 IF M1=7 AND M2=3 THEN 140 190 S(M1)=0 200 S(M2)=1 205 GOSUB 1000 210 IF S(1)=1 OR S(2)=1 OR S(3)=1 THEN 820 220 FOR I=1 TO 9 221 IF S(I)=-1 THEN 230 222 NEXT I 223 GOTO 820 230 FOR I=1 TO 9 240 IF S(I)<>-1 THEN 330 250 IF S(I+3)=0 THEN 350 260 IF FNR(I)=I THEN 320 270 IF I>3 THEN 300 280 IF S(5)=1 THEN 350 290 GOTO 330 300 IF S(8)=1 THEN 350 310 GOTO 330 320 IF S(I+2)=1 OR S(I+4)=1 THEN 350 330 NEXT I 340 GOTO 820 350 FOR I=1 TO 19 360 FOR J=1 TO 3 370 FOR K=3 TO 1 STEP -1 380 T((J-1)*3+K)=B(I,(J-1)*3+4-K) 390 NEXT K 400 NEXT J 410 FOR J=1 TO 9 420 IF S(J)<>B(I,J) THEN 460 430 NEXT J 440 R=0 450 GOTO 540 460 FOR J=1 TO 9 470 IF S(J)<>T(J) THEN 510 480 NEXT J 490 R=1 500 GOTO 540 510 NEXT I 511 REMEMBER THE TERMINATION OF THIS LOOP IS IMPOSSIBLE 512 PRINT "ILLEGAL BOARD PATTERN." 530 STOP 540 X=I 550 FOR I=1 TO 4 560 IF M(X,I)<>0 THEN 600 570 NEXT I 580 PRINT "I RESIGN." 590 GOTO 820 600 Y=INT(RND(1)*4+1) 601 IF M(X,Y)=0 THEN 600 610 IF R<>0 THEN 630 620 PRINT "I MOVE FROM ";STR$(INT(M(X,Y)/10));" TO ";STR$(FNM(M(X,Y))) 622 S(INT(M(X,Y)/10))=0 623 S(FNM(M(X,Y)))=-1 624 GOTO 640 630 PRINT "I MOVE FROM ";STR$(FNR(INT(M(X,Y)/10)));" TO "; 631 PRINT STR$(FNR(FNM(M(X,Y)))) 632 S(FNR(INT(M(X,Y)/10)))=0 633 S(FNR(FNM(M(X,Y))))=-1 640 GOSUB 1000 641 IF S(7)=-1 OR S(8)=-1 OR S(9)=-1 THEN 870 650 FOR I=1 TO 9 660 IF S(I)=1 THEN 690 670 NEXT I 680 GOTO 870 690 FOR I=1 TO 9 700 IF S(I)<>1 THEN 790 710 IF S(I-3)=0 THEN 120 720 IF FNR(I)=I THEN 780 730 IF I<7 THEN 760 740 IF S(5)=-1 THEN 120 750 GOTO 790 760 IF S(2)=-1 THEN 120 770 GOTO 790 780 IF S(I-2)=-1 OR S(I-4)=-1 THEN 120 790 NEXT I 800 PRINT "YOU CAN'T MOVE, SO "; 810 GOTO 870 820 PRINT "YOU WIN." 830 M(X,Y)=0 840 L=L+1 850 PRINT "I HAVE WON";W;"AND YOU";L;"OUT OF";L+W;"GAMES." 851 PRINT 860 GOTO 100 870 PRINT "I WIN." 880 W=W+1 890 GOTO 850 900 DATA -1,-1,-1,1,0,0,0,1,1,-1,-1,-1,0,1,0,1,0,1 905 DATA -1,0,-1,-1,1,0,0,0,1,0,-1,-1,1,-1,0,0,0,1 910 DATA -1,0,-1,1,1,0,0,1,0,-1,-1,0,1,0,1,0,0,1 915 DATA 0,-1,-1,0,-1,1,1,0,0,0,-1,-1,-1,1,1,1,0,0 920 DATA -1,0,-1,-1,0,1,0,1,0,0,-1,-1,0,1,0,0,0,1 925 DATA 0,-1,-1,0,1,0,1,0,0,-1,0,-1,1,0,0,0,0,1 930 DATA 0,0,-1,-1,-1,1,0,0,0,-1,0,0,1,1,1,0,0,0 935 DATA 0,-1,0,-1,1,1,0,0,0,-1,0,0,-1,-1,1,0,0,0 940 DATA 0,0,-1,-1,1,0,0,0,0,0,-1,0,1,-1,0,0,0,0 945 DATA -1,0,0,-1,1,0,0,0,0 950 DATA 24,25,36,0,14,15,36,0,15,35,36,47,36,58,59,0 955 DATA 15,35,36,0,24,25,26,0,26,57,58,0 960 DATA 26,35,0,0,47,48,0,0,35,36,0,0,35,36,0,0 965 DATA 36,0,0,0,47,58,0,0,15,0,0,0 970 DATA 26,47,0,0,47,58,0,0,35,36,47,0,28,58,0,0,15,47,0,0 1000 PRINT 1010 FOR I=1 TO 3 1020 FOR J=1 TO 3 1030 PRINT TAB(10);MID$(P$,S((I-1)*3+J)+2,1); 1040 NEXT J 1050 PRINT 1060 NEXT I 1070 PRINT 1080 RETURN 2000 PRINT: PRINT "THIS PROGRAM PLAYS THE GAME OF HEXAPAWN." 2010 PRINT "HEXAPAWN IS PLAYED WITH CHESS PAWNS ON A 3 BY 3 BOARD." 2020 PRINT "THE PAWNS ARE MOVED AS IN CHESS - ONE SPACE FORWARD TO" 2030 PRINT "AN EMPTY SPACE OR ONE SPACE FORWARD AND DIAGONALLY TO" 2040 PRINT "CAPTURE AN OPPOSING MAN. ON THE BOARD, YOUR PAWNS" 2050 PRINT "ARE 'O', THE COMPUTER'S PAWNS ARE 'X', AND EMPTY " 2060 PRINT "SQUARES ARE '.'. TO ENTER A MOVE, TYPE THE NUMBER OF" 2070 PRINT "THE SQUARE YOU ARE MOVING FROM, FOLLOWED BY THE NUMBER" 2080 PRINT "OF THE SQUARE YOU WILL MOVE TO. THE NUMBERS MUST BE" 2090 PRINT "SEPERATED BY A COMMA.": PRINT 2100 PRINT "THE COMPUTER STARTS A SERIES OF GAMES KNOWING ONLY WHEN" 2105 PRINT "THE GAME IS WON (A DRAW IS IMPOSSIBLE) AND HOW TO MOVE." 2110 PRINT "IT HAS NO STRATEGY AT FIRST AND JUST MOVES RANDOMLY." 2120 PRINT "HOWEVER, IT LEARNS FROM EACH GAME. THUS, WINNING BECOMES" 2130 PRINT "MORE AND MORE DIFFICULT. ALSO, TO HELP OFFSET YOUR" 2140 PRINT "INITIAL ADVANTAGE, YOU WILL NOT BE TOLD HOW TO WIN THE" 2150 PRINT "GAME BUT MUST LEARN THIS BY PLAYING." 2160 PRINT: PRINT "THE NUMBERING OF THE BOARD IS AS FOLLOWS:" 2170 PRINT TAB(10);"123": PRINT TAB(10);"456": PRINT TAB(10);"789" 2180 PRINT: PRINT "FOR EXAMPLE, TO MOVE YOUR RIGHTMOST PAWN FORWARD," 2190 PRINT "YOU WOULD TYPE 9,6 IN RESPONSE TO THE QUESTION" 2200 PRINT "'YOUR MOVE ?'. SINCE I'M A GOOD SPORT, YOU'LL ALWAYS" 2210 PRINT "GO FIRST.": PRINT 2220 GOTO 100 9999 END 10 PRINT TAB(34);"HI LO" 20 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 30 PRINT:PRINT:PRINT 100 PRINT "THIS IS THE GAME OF HI LO.":PRINT 110 PRINT "YOU WILL HAVE 6 TRIES TO GUESS THE AMOUNT OF MONEY IN THE" 120 PRINT "HI LO JACKPOT, WHICH IS BETWEEN 1 AND 100 DOLLARS. IF YOU" 130 PRINT "GUESS THE AMOUNT, YOU WIN ALL THE MONEY IN THE JACKPOT!" 140 PRINT "THEN YOU GET ANOTHER CHANCE TO WIN MORE MONEY. HOWEVER," 150 PRINT "IF YOU DO NOT GUESS THE AMOUNT, THE GAME ENDS.":PRINT 160 R=0 170 B=0:PRINT 180 Y=INT(100*RND(1)) 200 PRINT "YOUR GUESS"; 210 INPUT A 220 B=B+1 230 IF A=Y THEN 300 240 IF A>Y THEN 270 250 PRINT "YOUR GUESS IS TOO LOW.":GOTO 280 270 PRINT "YOUR GUESS IS TOO HIGH." 280 PRINT:IF B<6 THEN 200 290 PRINT "YOU BLEW IT...TOO BAD...THE NUMBER WAS";Y 295 R=0:GOTO 350 300 PRINT "GOT IT!!!!!!!!!! YOU WIN";Y;"DOLLARS." 310 R=R+Y 320 PRINT "YOUR TOTAL WINNINGS ARE NOW";R;"DOLLARS." 350 PRINT:PRINT "PLAY AGAIN (YES OR NO)"; 360 INPUT A$:IF A$="YES" THEN 170 380 PRINT:PRINT "SO LONG. HOPE YOU ENJOYED YOURSELF!!!" 390 END 1 PRINT TAB(33);"H-I-Q" 2 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 3 PRINT:PRINT:PRINT 4 DIM B(70),T(9,9) 5 PRINT "HERE IS THE BOARD:": PRINT 6 PRINT " ! ! !" 7 PRINT " 13 14 15": PRINT 8 PRINT " ! ! !" 9 PRINT " 22 23 24": PRINT 10 PRINT "! ! ! ! ! ! !" 11 PRINT "29 30 31 32 33 34 35": PRINT 12 PRINT "! ! ! ! ! ! !" 13 PRINT "38 39 40 41 42 43 44": PRINT 14 PRINT "! ! ! ! ! ! !" 15 PRINT "47 48 49 50 51 52 53": PRINT 16 PRINT " ! ! !" 17 PRINT " 58 59 60": PRINT 18 PRINT " ! ! !" 19 PRINT " 67 68 69": PRINT 20 PRINT "TO SAVE TYPING TIME, A COMPRESSED VERSION OF THE GAME BOARD" 22 PRINT "WILL BE USED DURING PLAY. REFER TO THE ABOVE ONE FOR PEG" 24 PRINT "NUMBERS. OK, LET'S BEGIN." 28 REM *** SET UP BOARD 29 FOR R=1 TO 9 30 FOR C=1 TO 9 31 IF (R-4)*(R-5)*(R-6)=0 THEN 40 32 IF (C-4)*(C-5)*(C-6)=0 THEN 40 35 T(R,C)=-5 36 GOTO 50 40 IF (R-1)*(C-1)*(R-9)*(C-9)=0 THEN 35 42 T(R,C)=5 50 NEXT C 60 NEXT R 65 T(5,5)=0: GOSUB 500 70 REM *** INPUT MOVE AND CHECK ON LEGALITY 75 FOR W=1 TO 33 77 READ M 79 DATA 13,14,15,22,23,24,29,30,31,32,33,34,35,38,39,40,41 81 DATA 42,43,44,47,48,49,50,51,52,53,58,59,60,67,68,69 83 B(M)=-7: NEXT W 86 B(41)=-3 100 INPUT "MOVE WHICH PIECE";Z 110 IF B(Z)=-7 THEN 140 120 PRINT "ILLEGAL MOVE, TRY AGAIN...": GOTO 100 140 INPUT "TO WHERE";P 150 IF B(P)=0 THEN 120 153 IF B(P)=-7 THEN 120 156 IF Z=P THEN 100 160 IF ((Z+P)/2)=INT((Z+P)/2) THEN 180 170 GOTO 120 180 IF (ABS(Z-P)-2)*(ABS(Z-P)-18)<>0 THEN 120 190 GOSUB 1000 200 GOSUB 500 210 GOSUB 1500 220 GOTO 100 500 REM *** PRINT BOARD 510 FOR X=1 TO 9 520 FOR Y=1 TO 9 525 IF (X-1)*(X-9)*(Y-1)*(Y-9)=0 THEN 550 530 IF (X-4)*(X-5)*(X-6)=0 THEN 570 540 IF (Y-4)*(Y-5)*(Y-6)=0 THEN 570 550 REM 560 GOTO 610 570 IF T(X,Y)<>5 THEN 600 580 PRINT TAB(Y*2);"!"; 590 GOTO 610 600 PRINT TAB(Y*2);"O"; 610 REM 615 NEXT Y 620 PRINT 630 NEXT X 640 RETURN 1000 REM *** UPDATE BOARD 1005 C=1: FOR X=1 TO 9 1020 FOR Y=1 TO 9 1030 IF C<>Z THEN 1220 1040 IF C+2<>P THEN 1080 1045 IF T(X,Y+1)=0 THEN 120 1050 T(X,Y+2)=5 1060 T(X,Y+1)=0: B(C+1)=-3 1070 GOTO 1200 1080 IF C+18<>P THEN 1130 1085 IF T(X+1,Y)=0 THEN 120 1090 T(X+2,Y)=5: T(X+1,Y)=0: B(C+9)=-3 1120 GOTO 1200 1130 IF C-2<>P THEN 1170 1135 IF T(X,Y-1)=0 THEN 120 1140 T(X,Y-2)=5: T(X,Y-1)=0: B(C-1)=-3 1160 GOTO 1200 1170 IF C-18<>P THEN 1220 1175 IF T(X-1,Y)=0 THEN 120 1180 T(X-2,Y)=5: T(X-1,Y)=0: B(C-9)=-3 1200 B(Z)=-3: B(P)=-7 1210 T(X,Y)=0: GOTO 1240 1220 C=C+1 1225 NEXT Y 1230 NEXT X 1240 RETURN 1500 REM*** CHECK IF GAME IS OVER 1505 F=0 1510 FOR R=2 TO 8 1520 FOR C=2 TO 8 1530 IF T(R,C)<>5 THEN 1580 1535 F=F+1 1540 FOR A=R-1 TO R+1 1545 T=0 1550 FOR B=C-1 TO C+1 1560 T=T+T(A,B) 1561 NEXT B 1564 IF T<>10 THEN 1567 1565 IF T(A,C)<>0 THEN 1630 1567 NEXT A 1568 FOR X=C-1 TO C+1 1569 T=0 1570 FOR Y=R-1 TO R+1 1571 T=T+T(Y,X) 1572 NEXT Y 1573 IF T<>10 THEN 1575 1574 IF T(R,X)<>0 THEN 1630 1575 NEXT X 1580 NEXT C 1590 NEXT R 1600 REM *** GAME IS OVER 1605 PRINT "THE GAME IS OVER." 1610 PRINT "YOU HAD";F;"PIECES REMAINING." 1611 IF F<>1 THEN 1615 1612 PRINT "BRAVO! YOU MADE A PERFECT SCORE!" 1613 PRINT "SAVE THIS PAPER AS A RECORD OF YOUR ACCOMPLISHMENT!" 1615 PRINT: INPUT "PLAY AGAIN (YES OR NO)";A$ 1617 IF A$="NO" THEN 2000 1618 RESTORE: GOTO 28 1620 STOP 1630 RETURN 2000 PRINT: PRINT "SO LONG FOR NOW.": PRINT 2010 END 2 PRINT TAB(33);"HOCKEY" 4 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 6 PRINT:PRINT:PRINT 10 REM ROBERT PUOPOLO ALG. 1 140 MCCOWAN 6/7/73 HOCKEY 30 LET X=1 40 PRINT:PRINT:PRINT 50 PRINT "WOULD YOU LIKE THE INSTRUCTIONS";:INPUT C$ 55 PRINT 60 IF C$="NO" THEN 90 65 IF C$="YES" THEN 80 70 PRINT "ANSWER YES OR NO!!":GOTO 50 80 GOTO 1720 90 DIM A$(7),B$(7),H(20),T(5),T1(5),T2(5),T3(5) 100 PRINT "ENTER THE TWO TEAMS";:INPUT A$(7),B$(7) 105 PRINT 110 PRINT "ENTER THE NUMBER OF MINUTES IN A GAME";:INPUT T6 115 PRINT 120 IF T6<1 THEN 110:PRINT 130 PRINT "WOULD THE " A$(7) " COACH ENTER HIS TEAM" 135 PRINT 140 FOR I=1 TO 6:PRINT "PLAYER"I;:INPUT A$(I):NEXT I:PRINT 150 PRINT "WOULD THE " B$(7) " COACH DO THE SAME" 155 PRINT 160 FOR T=1 TO 6:PRINT "PLAYER"T;:INPUT B$(T):NEXT T:PRINT 170 PRINT "INPUT THE REFEREE FOR THIS GAME";:INPUT R$ 180 PRINT:PRINT TAB(10);A$(7) " STARTING LINEUP" 190 FOR T=1 TO 6:PRINT A$(T):NEXT T 200 PRINT:PRINT TAB(10);B$(7)" STARTING LINEUP" 210 FOR T=1 TO 6:PRINT B$(T):NEXT T:PRINT 220 PRINT "WE'RE READY FOR TONIGHTS OPENING FACE-OFF." 230 PRINT R$ " WILL DROP THE PUCK BETWEEN " A$(2) " AND " B$(2) 240 FOR L=1 TO T6:IF L=1 THEN 260 250 PRINT "AND WE'RE READY FOR THE FACE-OFF" 260 C=INT(2*RND(X))+1:ON C GOTO 270,280 270 PRINT A$(7) " HAS CONTROL OF THE PUCK":GOTO 290 280 PRINT B$(7) " HAS CONTROL." 290 PRINT "PASS";:INPUT P:FOR N=1 TO 3:H(N)=0:NEXT N 300 IF P<0 THEN 290 305 IF P>3 THEN 290 310 FOR J=1 TO (P+2) 320 H(J)=INT(5*RND(X))+1 330 NEXT J:IF H(J-1)=H(J-2) THEN 310 331 IF P+2<3 THEN 350 335 IF H(J-1)=H(J-3) THEN 310 340 IF H(J-2)=H(J-3) THEN 310 350 IF P=0 THEN 360 355 GOTO 490 360 INPUT "SHOT";S:IF S<1 THEN 360 365 IF S>4 THEN 360 370 ON C GOTO 380,480 380 PRINT A$(H(J-1));:G=H(J-1):G1=0:G2=0 390 ON S GOTO 400,420,440,460 400 PRINT " LET'S A BOOMER GO FROM THE RED LINE!!" 410 Z=10:GOTO 890 420 PRINT " FLIPS A WRISTSHOT DOWN THE ICE" 440 PRINT " BACKHANDS ONE IN ON THE GOALTENDER" 450 Z=25:GOTO 890 460 PRINT " SNAPS A LONG FLIP SHOT" 470 Z=17:GOTO 890 480 PRINT B$(H(J-1));:G1=0:G2=0:G=H(J-1):GOTO 390 490 ON C GOTO 500,640 500 ON P GOTO 510,540,570 510 PRINT A$(H(J-2)) " LEADS " A$(H(J-1)) " WITH A PERFECT PASS." 520 PRINT A$(H(J-1)) " CUTTING IN!!!" 530 G=H(J-1):G1=H(J-2):G2=0:Z1=3:GOTO 770 540 PRINT A$(H(J-2)) " GIVES TO A STREAKING " A$(H(J-1)) 550 PRINT A$(H(J-3)) " COMES DOWN ON " B$(5) " AND " B$(4) 560 G=H(J-3):G1=H(J-1):G2=H(J-2):Z1=2:GOTO 770 570 PRINT "OH MY GOD!! A ' 4 ON 2 ' SITUATION" 580 PRINT A$(H(J-3)) " LEADS " A$(H(J-2)) 590 PRINT A$(H(J-2)) " IS WHEEELING THROUGH CENTER." 600 PRINT A$(H(J-2)) " GIVES AND GOES WITH " A$(H(J-1)) 610 PRINT "PRETTY PASSING!" 620 PRINT A$(H(J-1)) " DROPS IT TO " A$(H(J-4)) 630 G=H(J-4):G1=J(J-1):G2=H(J-2):Z1=1:GOTO 770 640 ON P GOTO 650,670,720 650 PRINT B$(H(J-1)) " HITS " B$(H(J-2)) " FLYING DOWN THE LEFT SIDE" 660 G=H(J-2):G1=H(J-1):G2=0:Z1=3:GOTO 770 670 PRINT "IT'S A ' 3 ON 2 '!" 680 PRINT "ONLY " A$(4) " AND " A$(5) " ARE BACK." 690 PRINT B$(H(J-2)) " GIVES OFF TO " B$(H(J-1)) 700 PRINT B$(H(J-1)) " DROPS TO " B$(H(J-3)) 710 G=H(J-3):G1=H(J-1):G2=H(J-2):Z1=2:GOTO 770 720 PRINT " A ' 3 ON 2 ' WITH A ' TRAILER '!" 730 PRINT B$(H(J-4)) " GIVES TO " B$(H(J-2)) " WHO SHUFFLES IT OFF TO" 740 PRINT B$(H(J-1)) " WHO FIRES A WING TO WING PASS TO " 750 PRINT B$(H(J-3)) " AS HE CUTS IN ALONE!!" 760 G=H(J-3):G1=H(J-1):G2=H(J-2):Z1=1:GOTO 770 770 PRINT "SHOT";:INPUT S:IF S>4 THEN 770:IF S<1 THEN 770 780 ON C GOTO 790,880 790 PRINT A$(G);:ON S GOTO 800,820,840,860 800 PRINT " LET'S A BIG SLAP SHOT GO!!" 810 Z=4:Z=Z+Z1:GOTO 890 820 PRINT " RIPS A WRIST SHOT OFF" 830 Z=2:Z=Z+Z1:GOTO 890 840 PRINT " GETS A BACKHAND OFF" 850 Z=3:Z=Z+Z1:GOTO 890 860 PRINT " SNAPS OFF A SNAP SHOT" 870 Z=2:Z=Z+Z1:GOTO 890 880 PRINT B$(G);:ON S GOTO 800,820,840,860 890 PRINT "AREA";:INPUT A:IF A<1 THEN 890 895 IF A>4 THEN 890 900 ON C GOTO 910,920 910 S2=S2+1:GOTO 930 920 S3=S3+1 930 A1=INT(4*RND(X))+1:IF A<>A1 THEN 1200 940 H(20)=INT(100*RND(X))+1 950 IF INT(H(20)/Z)=H(20)/Z THEN 1160 960 ON C GOTO 970,980 970 PRINT "GOAL " A$(7):H(9)=H(9)+1:GOTO 990 980 PRINT "SCORE " B$(7):H(8)=H(8)+1 990 FOR B1=1 TO 25:PRINT CHR$(7);:NEXT B1:PRINT 1000 PRINT "SCORE: ";:IF H(8)>H(9) THEN 1020 1010 PRINT A$(7)":";H(9),B$(7)":";H(8):GOTO 1030 1020 PRINT B$(7)":";H(8),A$(7)":";H(9) 1030 ON C GOTO 1040,1100 1040 PRINT "GOAL SCORED BY: " A$(G):IF G1=0 THEN 1070 1050 IF G2=0 THEN 1080 1060 PRINT " ASSISTED BY: " A$(G1) " AND " A$(G2):GOTO 1090 1070 PRINT " UNASSISTED.":GOTO 1090 1080 PRINT " ASSISTED BY: " A$(G1) 1090 T(G)=T(G)+1:T1(G1)=T1(G1)+1:T1(G2)=T1(G2)+1:GOTO 1540 1100 PRINT "GOAL SCORED BY: " B$(G); 1110 IF G1=0 THEN 1130 1115 IF G2=0 THEN 1140 1120 PRINT " ASSISTED BY: " B$(G1) " AND " B$(G2):GOTO 1150 1130 PRINT " UNASSISTED":GOTO 1150 1140 PRINT " ASSISTED BY: " B$(G1):GOTO 1150 1150 T2(G)=T2(G)+1:T3(G1)=T3(G1)+1:T3(G2)=T3(G2)+1:GOTO 1540 1160 A2=INT(100*RND(X))+1:IF INT(A2/4)=A2/4 THEN 1170 1165 GOTO 1200 1170 ON C GOTO 1180,1190 1180 PRINT "SAVE " B$(6) " -- REBOUND":GOTO 940 1190 PRINT "SAVE " A$(6) " -- FOLLOW UP":GOTO 940 1200 S1=INT(6*RND(X))+1 1210 ON C GOTO 1220,1380 1220 ON S1 GOTO 1230,1260,1290,1300,1330,1350 1230 PRINT "KICK SAVE AND A BEAUTY BY " B$(6) 1240 PRINT "CLEARED OUT BY " B$(3) 1250 GOTO 260 1260 PRINT "WHAT A SPECTACULAR GLOVE SAVE BY " B$(6) 1270 PRINT "AND " B$(6) " GOLFS IT INTO THE CROWD" 1280 GOTO 1540 1290 PRINT "SKATE SAVE ON A LOW STEAMER BY " B$(6):GOTO 260 1300 PRINT "PAD SAVE BY " B$(6) " OFF THE STICK" 1310 PRINT "OF "A$(G) " AND " B$(6) " COVERS UP" 1320 GOTO 1540 1330 PRINT "WHISTLES ONE OVER THE HEAD OF " B$(6) 1340 GOTO 260 1350 PRINT B$(6) " MAKES A FACE SAVE!! AND HE IS HURT" 1360 PRINT "THE DEFENSEMAN " B$(5) " COVERS UP FOR HIM" 1370 GOTO 1540 1380 ON S1 GOTO 1390,1410,1440,1470,1490,1520 1390 PRINT "STICK SAVE BY " A$(6) 1400 PRINT "AND CLEARED OUT BY " A$(4):GOTO 260 1410 PRINT "OH MY GOD!! " B$(G) " RATTLES ONE OFF THE POST" 1420 PRINT "TO THE RIGHT OF " A$(6) " AND " A$(6) " COVERS "; 1430 PRINT "ON THE LOOSE PUCK!":GOTO 1540 1440 PRINT "SKATE SAVE BY " A$(6) 1450 PRINT A$(6) " WHACKS THE LOOSE PUCK INTO THE STANDS" 1460 GOTO 1540 1470 PRINT "STICK SAVE BY " A$(6) " AND HE CLEARS IT OUT HIMSELF" 1480 GOTO 260 1490 PRINT "KICKED OUT BY " A$(6) 1500 PRINT "AND IT REBOUNDS ALL THE WAY TO CENTER ICE" 1510 GOTO 260 1520 PRINT "GLOVE SAVE " A$(6) " AND HE HANGS ON" 1530 GOTO 1540 1540 NEXT L:FOR N=1 TO 30:PRINT CHR$(7);:NEXT N:PRINT "THAT'S THE SIREN" 1550 PRINT:PRINT TAB(15);"FINAL SCORE:" 1560 IF H(8)>H(9) THEN 1580 1570 PRINT A$(7)":";H(9),B$(7)":";H(8):GOTO 1590 1580 PRINT B$(7)":";H(8),A$(7)":";H(9) 1590 PRINT: PRINT TAB(10);"SCORING SUMMARY":PRINT 1600 PRINT TAB(25);A$(7) 1610 PRINT TAB(5);"NAME";TAB(20);"GOALS";TAB(35);"ASSISTS" 1620 PRINT TAB(5);"----";TAB(20);"-----";TAB(35);"-------" 1630 FOR I=1 TO 5:PRINT TAB(5);A$(I);TAB(21);T(I);TAB(36);T1(I) 1640 NEXT I:PRINT 1650 PRINT TAB(25);B$(7) 1660 PRINT TAB(5);"NAME";TAB(20);"GOALS";TAB(35);"ASSISTS" 1670 PRINT TAB(5);"----";TAB(20);"-----";TAB(35);"-------" 1680 FOR T=1 TO 5:PRINT TAB(5);B$(T);TAB(21);T2(T);TAB(36);T3(T) 1690 NEXT T:PRINT 1700 PRINT "SHOTS ON NET":PRINT A$(7)":";S2:PRINT B$(7)":";S3 1710 END 1720 PRINT: PRINT "THIS IS A SIMULATED HOCKEY GAME." 1730 PRINT "QUESTION RESPONSE" 1740 PRINT "PASS TYPE IN THE NUMBER OF PASSES YOU WOULD" 1750 PRINT " LIKE TO MAKE, FROM 0 TO 3." 1760 PRINT "SHOT TYPE THE NUMBER CORRESPONDING TO THE SHOT" 1770 PRINT " YOU WANT TO MAKE. ENTER:" 1780 PRINT " 1 FOR A SLAPSHOT" 1790 PRINT " 2 FOR A WRISTSHOT" 1800 PRINT " 3 FOR A BACKHAND" 1810 PRINT " 4 FOR A SNAP SHOT" 1820 PRINT "AREA TYPE IN THE NUMBER CORRESPONDING TO" 1830 PRINT " THE AREA YOU ARE AIMING AT. ENTER:" 1840 PRINT " 1 FOR UPPER LEFT HAND CORNER" 1850 PRINT " 2 FOR UPPER RIGHT HAND CORNER" 1860 PRINT " 3 FOR LOWER LEFT HAND CORNER" 1870 PRINT " 4 FOR LOWER RIGHT HAND CORNER" 1880 PRINT 1890 PRINT "AT THE START OF THE GAME, YOU WILL BE ASKED FOR THE NAMES" 1900 PRINT "OF YOUR PLAYERS. THEY ARE ENTERED IN THE ORDER: " 1910 PRINT "LEFT WING, CENTER, RIGHT WING, LEFT DEFENSE," 1920 PRINT "RIGHT DEFENSE, GOALKEEPER. ANY OTHER INPUT REQUIRED WILL" 1930 PRINT "HAVE EXPLANATORY INSTRUCTIONS." 1940 GOTO 90 1950 END 100 PRINT TAB(31);"HORSERACE" 110 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 120 PRINT:PRINT:PRINT 210 DIM S(8) 220 PRINT "WELCOME TO SOUTH PORTLAND HIGH RACETRACK" 230 PRINT " ...OWNED BY LAURIE CHEVALIER" 240 PRINT "DO YOU WANT DIRECTIONS"; 250 INPUT X$ 260 IF X$="NO" THEN 320 270 PRINT"UP TO 10 MAY PLAY. A TABLE OF ODDS WILL BE PRINTED. YOU" 280 PRINT"MAY BET ANY + AMOUNT UNDER 100000 ON ONE HORSE." 290 PRINT "DURING THE RACE, A HORSE WILL BE SHOWN BY ITS" 300 PRINT"NUMBER. THE HORSES RACE DOWN THE PAPER!" 310 PRINT 320 PRINT "HOW MANY WANT TO BET"; 330 INPUT C 340 PRINT "WHEN ? APPEARS,TYPE NAME" 350 FOR A=1 TO C 360 INPUT W$(A) 370 NEXT A 380 PRINT 390 PRINT"HORSE",,"NUMBER","ODDS" 400 PRINT 410 FOR I=1 TO 8: S(I)=0: NEXT I 420 LET R=0 430 FOR A=1 TO 8 440 LET D(A)=INT(10*RND(1)+1) 450 NEXT A 460 FOR A=1 TO 8 470 LET R=R+D(A) 480 NEXT A 490 LET V$(1)="JOE MAW" 500 LET V$(2)="L.B.J." 510 LET V$(3)="MR.WASHBURN" 520 LET V$(4)="MISS KAREN" 530 LET V$(5)="JOLLY" 540 LET V$(6)="HORSE" 550 LET V$(7)="JELLY DO NOT" 560 LET V$(8)="MIDNIGHT" 570 FOR N=1 TO 8 580 PRINT V$(N),,N,R/D(N);":1" 590 NEXT N 600 PRINT"--------------------------------------------------" 610 PRINT "PLACE YOUR BETS...HORSE # THEN AMOUNT" 620 FOR J=1 TO C 630 PRINT W$(J); 640 INPUT Q(J),P(J) 650 IF P(J)<1 THEN 670 660 IF P(J)<100000 THEN 690 670 PRINT" YOU CAN'T DO THAT!" 680 GOTO 630 690 NEXT J 700 PRINT 710 PRINT"1 2 3 4 5 6 7 8" 720 PRINT"XXXXSTARTXXXX" 730 FOR I=1 TO 8 740 LET M=I 750 LET M(I)=M 760 LET Y(M(I))=INT(100*RND(1)+1) 770 IF Y(M(I))<10 THEN 860 780 LET S=INT(R/D(I)+.5) 790 IF Y(M(I))<S+17 THEN 880 800 IF Y(M(I))<S+37 THEN 900 810 IF Y(M(I))<S+57 THEN 920 820 IF Y(M(I))<77+S THEN 940 830 IF Y(M(I))<S+92 THEN 960 840 LET Y(M(I))=7 850 GOTO 970 860 LET Y(M(I))=1 870 GOTO 970 880 LET Y(M(I))=2 890 GOTO 970 900 LET Y(M(I))=3 910 GOTO 970 920 LET Y(M(I))=4 930 GOTO 970 940 LET Y(M(I))=5 950 GOTO 970 960 LET Y(M(I))=6 970 NEXT I 980 LET M=I 990 FOR I=1 TO 8 1000 LET S(M(I))=S(M(I))+Y(M(I)) 1010 NEXT I 1020 LET I=1 1030 FOR L=1 TO 8 1040 FOR I=1 TO 8-L 1050 IF S(M(I))<S(M(I+1))THEN 1090 1060 LET H=M(I) 1070 LET M(I)=M(I+1) 1080 LET M(I+1)=H 1090 NEXT I 1100 NEXT L 1110 LET T=S(M(8)) 1120 FOR I=1 TO 8 1130 LET B=S(M(I))-S(M(I-1)) 1140 IF B=0 THEN 1190 1150 FOR A=1 TO B 1160 PRINT 1170 IF S(M(I))>27 THEN 1240 1180 NEXT A 1190 PRINT M(I); 1200 NEXT I 1210 FOR A=1 TO 28-T 1220 PRINT 1230 NEXT A 1240 PRINT "XXXXFINISHXXXX"; 1242 PRINT 1243 PRINT 1244 PRINT "---------------------------------------------" 1245 PRINT 1250 IF T<28 THEN 720 1270 PRINT "THE RACE RESULTS ARE:" 1272 LET Z9=1 1280 FOR I=8 TO 1 STEP-1 1290 LET F=M(I) 1300 PRINT 1310 PRINT Z9;"PLACE HORSE NO.";F,"AT ";R/D(F);":1" 1312 LET Z9=Z9+1 1320 NEXT I 1330 FOR J=1 TO C 1340 IF Q(J)<>M(8) THEN 1370 1350 LET N=Q(J) 1355 PRINT 1360 PRINT W$(J);" WINS $";(R/D(N))*P(J) 1370 NEXT J 1372 PRINT "DO YOU WANT TO BET ON THE NEXT RACE ?" 1374 INPUT "YES OR NO"; O$ 1376 IF O$="YES" THEN 380 1380 END 10 PRINT TAB(33);"HURKLE" 20 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 30 PRINT:PRINT:PRINT 110 N=5 120 G=10 210 PRINT 220 PRINT "A HURKLE IS HIDING ON A";G;"BY";G;"GRID. HOMEBASE" 230 PRINT "ON THE GRID IS POINT 0,0 IN THE SOUTHWEST CORNER," 235 PRINT "AND ANY POINT ON THE GRID IS DESIGNATED BY A" 240 PRINT "PAIR OF WHOLE NUMBERS SEPERATED BY A COMMA. THE FIRST" 245 PRINT "NUMBER IS THE HORIZONTAL POSITION AND THE SECOND NUMBER" 246 PRINT "IS THE VERTICAL POSITION. YOU MUST TRY TO" 250 PRINT "GUESS THE HURKLE'S GRIDPOINT. YOU GET";N;"TRIES." 260 PRINT "AFTER EACH TRY, I WILL TELL YOU THE APPROXIMATE" 270 PRINT "DIRECTION TO GO TO LOOK FOR THE HURKLE." 280 PRINT 285 A=INT(G*RND(1)) 286 B=INT(G*RND(1)) 310 FOR K=1 TO N 320 PRINT "GUESS #";K; 330 INPUT X,Y 340 IF ABS(X-A)+ABS(Y-B)=0 THEN 500 350 REM PRINT INFO 360 GOSUB 610 370 PRINT 380 NEXT K 410 PRINT 420 PRINT "SORRY, THAT'S";N;"GUESSES." 430 PRINT "THE HURKLE IS AT ";A;",";B 440 PRINT 450 PRINT "LET'S PLAY AGAIN, HURKLE IS HIDING." 460 PRINT 470 GOTO 285 500 REM 510 PRINT 520 PRINT "YOU FOUND HIM IN";K;"GUESSES!" 540 GOTO 440 610 PRINT "GO "; 620 IF Y=B THEN 670 630 IF Y<B THEN 660 640 PRINT "SOUTH"; 650 GOTO 670 660 PRINT "NORTH"; 670 IF X=A THEN 720 680 IF X<A THEN 710 690 PRINT "WEST"; 700 GOTO 720 710 PRINT "EAST"; 720 PRINT 730 RETURN 999 END 10 PRINT TAB(33);"KINEMA" 20 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 30 PRINT: PRINT: PRINT 100 PRINT 105 PRINT 106 Q=0 110 V=5+INT(35*RND(1)) 111 PRINT "A BALL IS THROWN UPWARDS AT";V;"METERS PER SECOND." 112 PRINT 115 A=.05*V^2 116 PRINT "HOW HIGH WILL IT GO (IN METERS)"; 117 GOSUB 500 120 A=V/5 122 PRINT "HOW LONG UNTIL IT RETURNS (IN SECONDS)"; 124 GOSUB 500 130 T=1+INT(2*V*RND(1))/10 132 A=V-10*T 134 PRINT "WHAT WILL ITS VELOCITY BE AFTER";T;"SECONDS"; 136 GOSUB 500 140 PRINT 150 PRINT Q;"RIGHT OUT OF 3."; 160 IF Q<2 THEN 100 170 PRINT " NOT BAD." 180 GOTO 100 500 INPUT G 502 IF ABS((G-A)/A)<.15 THEN 510 504 PRINT "NOT EVEN CLOSE...." 506 GOTO 512 510 PRINT "CLOSE ENOUGH." 511 Q=Q+1 512 PRINT "CORRECT ANSWER IS ";A 520 PRINT 530 RETURN 999 END 1 PRINT TAB(34);"KING" 2 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 3 PRINT:PRINT:PRINT 4 PRINT "DO YOU WANT INSTRUCTIONS"; 5 INPUT Z$ 6 N5=8 10 IF LEFT$(Z$,1)="N" THEN 47 11 IF Z$="AGAIN" THEN 1960 12 PRINT:PRINT:PRINT 20 PRINT "CONGRATULATIONS! YOU'VE JUST BEEN ELECTED PREMIER OF SETATS" 22 PRINT "DETINU, A SMALL COMMUNIST ISLAND 30 BY 70 MILES LONG. YOUR" 24 PRINT "JOB IS TO DECIDE UPON THE CONTRY'S BUDGET AND DISTRIBUTE" 26 PRINT "MONEY TO YOUR COUNTRYMEN FROM THE COMMUNAL TREASURY." 28 PRINT "THE MONEY SYSTEM IS RALLODS, AND EACH PERSON NEEDS 100" 30 PRINT "RALLODS PER YEAR TO SURVIVE. YOUR COUNTRY'S INCOME COMES" 32 PRINT "FROM FARM PRODUCE AND TOURISTS VISITING YOUR MAGNIFICENT" 34 PRINT "FORESTS, HUNTING, FISHING, ETC. HALF YOUR LAND IS FARM LAND" 36 PRINT "WHICH ALSO HAS AN EXCELLENT MINERAL CONTENT AND MAY BE SOLD" 38 PRINT "TO FOREIGN INDUSTRY (STRIP MINING) WHO IMPORT AND SUPPORT" 40 PRINT "THEIR OWN WORKERS. CROPS COST BETWEEN 10 AND 15 RALLODS PER" 42 PRINT "SQUARE MILE TO PLANT." 44 PRINT "YOUR GOAL IS TO COMPLETE YOUR";N5;"YEAR TERM OF OFFICE." 46 PRINT "GOOD LUCK!" 47 PRINT 50 A=INT(60000+(1000*RND(1))-(1000*RND(1))) 55 B=INT(500+(10*RND(1))-(10*RND(1))) 65 D=2000 100 W=INT(10*RND(1)+95) 102 PRINT 105 PRINT "YOU NOW HAVE ";A;" RALLODS IN THE TREASURY." 110 PRINT INT(B);:PRINT "COUNTRYMEN, "; 115 V9=INT(((RND(1)/2)*10+10)) 120 IF C=0 THEN 140 130 PRINT INT(C);"FOREIGN WORKERS, "; 140 PRINT "AND";INT(D);"SQ. MILES OF LAND." 150 PRINT "THIS YEAR INDUSTRY WILL BUY LAND FOR";W; 152 PRINT "RALLODS PER SQUARE MILE." 155 PRINT "LAND CURRENTLY COSTS";V9;"RALLODS PER SQUARE MILE TO PLANT." 162 PRINT 200 PRINT "HOW MANY SQUARE MILES DO YOU WISH TO SELL TO INDUSTRY"; 210 INPUT H 215 IF H<0 THEN 200 220 IF H<=D-1000 THEN 300 230 PRINT "*** THINK AGAIN. YOU ONLY HAVE";D-1000;"SQUARE MILES OF FARM LAND." 240 IF X<>0 THEN 200 250 PRINT:PRINT "(FOREIGN INDUSTRY WILL ONLY BUY FARM LAND BECAUSE" 260 PRINT "FOREST LAND IS UNECONOMICAL TO STRIP MINE DUE TO TREES," 270 PRINT "THICKER TOP SOIL, ETC.)" 280 X=1 299 GOTO 200 300 D=INT(D-H) 310 A=INT(A+(H*W)) 320 PRINT "HOW MANY RALLODS WILL YOU DISTRIBUTE AMONG YOUR COUNTRYMEN"; 340 INPUT I 342 IF I<0 THEN 320 350 IF I<A THEN 400 360 IF I=A THEN 380 370 PRINT " THINK AGAIN. YOU'VE ONLY";A;" RALLODS IN THE TREASURY" 375 GOTO 320 380 J=0 390 K=0 395 A=0 399 GOTO 1000 400 A=INT(A-I) 410 PRINT "HOW MANY SQUARE MILES DO YOU WISH TO PLANT"; 420 INPUT J 421 IF J<0 THEN 410 422 IF J<=B*2 THEN 426 423 PRINT " SORRY, BUT EACH COUNTRYMAN CAN ONLY PLANT 2 SQ. MILES." 424 GOTO 410 426 IF J<=D-1000 THEN 430 427 PRINT " SORRY, BUT YOU'VE ONLY";D-1000;"SQ. MILES OF FARM LAND." 428 GOTO 410 430 U1=INT(J*V9) 435 IF U1<A THEN 500 440 IF U1=A THEN 490 450 PRINT " THINK AGAIN. YOU'VE ONLY";A;" RALLODS LEFT IN THE TREASURY." 460 GOTO 410 490 K=0 495 A=0 499 GOTO 1000 500 A=A-U1 510 PRINT "HOW MANY RALLODS DO YOU WISH TO SPEND ON POLLUTION CONTROL"; 520 INPUT K 522 IF K<0 THEN 510 530 IF K<=A THEN 1000 540 PRINT " THINK AGAIN. YOU ONLY HAVE ";A;" RALLODS REMAINING." 550 GOTO 510 600 IF H<>0 THEN 1002 602 IF I<>0 THEN 1002 604 IF J<>0 THEN 1002 606 IF K<>0 THEN 1002 609 PRINT 612 PRINT "GOODBYE." 614 PRINT "(IF YOU WISH TO CONTINUE THIS GAME AT A LATER DATE, ANSWER" 616 PRINT "'AGAIN' WHEN ASKED IF YOU WANT INSTRUCTIONS AT THE START" 617 PRINT "OF THE GAME)." 618 STOP 1000 GOTO 600 1002 PRINT 1003 PRINT 1010 A=INT(A-K) 1020 A4=A 1100 IF INT(I/100-B)>=0 THEN 1120 1105 IF I/100<50 THEN 1700 1110 PRINT INT(B-(I/100));"COUNTRYMEN DIED OF STARVATION" 1120 F1=INT(RND(1)*(2000-D)) 1122 IF K<25 THEN 1130 1125 F1=INT(F1/(K/25)) 1130 IF F1<=0 THEN 1150 1140 PRINT F1;"COUNTRYMEN DIED OF CARBON-MONOXIDE AND DUST INHALATION" 1150 IF INT((I/100)-B)<0 THEN 1170 1160 IF F1>0 THEN 1180 1165 GOTO 1200 1170 PRINT " YOU WERE FORCED TO SPEND";INT((F1+(B-(I/100)))*9); 1172 PRINT "RALLODS ON FUNERAL EXPENSES" 1174 B5=INT(F1+(B-(I/100))) 1175 A=INT(A-((F1+(B-(I/100)))*9)) 1176 GOTO 1185 1180 PRINT " YOU WERE FORCED TO SPEND ";INT(F1*9);"RALLODS ON "; 1181 PRINT "FUNERAL EXPENSES." 1182 B5=F1 1183 A=INT(A-(F1*9)) 1185 IF A>=0 THEN 1194 1187 PRINT " INSUFFICIENT RESERVES TO COVER COST - LAND WAS SOLD" 1189 D=INT(D+(A/W)) 1190 A=0 1194 B=INT(B-B5) 1200 IF H=0 THEN 1250 1220 C1=INT(H+(RND(1)*10)-(RND(1)*20)) 1224 IF C>0 THEN 1230 1226 C1=C1+20 1230 PRINT C1;"WORKERS CAME TO THE COUNTRY AND"; 1250 P1=INT(((I/100-B)/10)+(K/25)-((2000-D)/50)-(F1/2)) 1255 PRINT ABS(P1);"COUNTRYMEN "; 1260 IF P1<0 THEN 1275 1265 PRINT "CAME TO"; 1270 GOTO 1280 1275 PRINT "LEFT"; 1280 PRINT " THE ISLAND." 1290 B=INT(B+P1) 1292 C=INT(C+C1) 1305 U2=INT(((2000-D)*((RND(1)+1.5)/2))) 1310 IF C=0 THEN 1324 1320 PRINT "OF ";INT(J);"SQ. MILES PLANTED,"; 1324 IF J>U2 THEN 1330 1326 U2=J 1330 PRINT " YOU HARVESTED ";INT(J-U2);"SQ. MILES OF CROPS." 1340 IF U2=0 THEN 1370 1344 IF T1>=2 THEN 1370 1350 PRINT " (DUE TO "; 1355 IF T1=0 THEN 1365 1360 PRINT "INCREASED "; 1365 PRINT "AIR AND WATER POLLUTION FROM FOREIGN INDUSTRY.)" 1370 Q=INT((J-U2)*(W/2)) 1380 PRINT "MAKING";INT(Q);"RALLODS." 1390 A=INT(A+Q) 1400 V1=INT(((B-P1)*22)+(RND(1)*500)) 1405 V2=INT((2000-D)*15) 1410 PRINT " YOU MADE";ABS(INT(V1-V2));"RALLODS FROM TOURIST TRADE." 1420 IF V2=0 THEN 1450 1425 IF V1-V2>=V3 THEN 1450 1430 PRINT " DECREASE BECAUSE "; 1435 G1=10*RND(1) 1440 IF G1<=2 THEN 1460 1442 IF G1<=4 THEN 1465 1444 IF G1<=6 THEN 1470 1446 IF G1<=8 THEN 1475 1448 IF G1<=10 THEN 1480 1450 V3=INT(A+V3) 1451 A=INT(A+V3) 1452 GOTO 1500 1460 PRINT "FISH POPULATION HAS DWINDLED DUE TO WATER POLLUTION." 1462 GOTO 1450 1465 PRINT "AIR POLLUTION IS KILLING GAME BIRD POPULATION." 1467 GOTO 1450 1470 PRINT "MINERAL BATHS ARE BEING RUINED BY WATER POLLUTION." 1472 GOTO 1450 1475 PRINT "UNPLEASANT SMOG IS DISCOURAGING SUN BATHERS." 1477 GOTO 1450 1480 PRINT "HOTELS ARE LOOKING SHABBY DUE TO SMOG GRIT." 1482 GOTO 1450 1500 IF B5>200 THEN 1600 1505 IF B<343 THEN 1700 1510 IF (A4/100)>5 THEN 1800 1515 IF C>B THEN 1550 1520 IF N5-1=X5 THEN 1900 1545 GOTO 2000 1550 PRINT 1552 PRINT 1560 PRINT "THE NUMBER OF FOREIGN WORKERS HAS EXCEEDED THE NUMBER" 1562 PRINT "OF COUNTRYMEN. AS A MINORITY, THEY HAVE REVOLTED AND" 1564 PRINT "TAKEN OVER THE COUNTRY." 1570 IF RND(1)<=.5 THEN 1580 1574 PRINT "YOU HAVE BEEN THROWN OUT OF OFFICE AND ARE NOW" 1576 PRINT "RESIDING IN PRISON." 1578 GOTO 1590 1580 PRINT "YOU HAVE BEEN ASSASSINATED." 1590 PRINT 1592 PRINT 1596 STOP 1600 PRINT 1602 PRINT 1610 PRINT B5;"COUNTRYMEN DIED IN ONE YEAR!!!!!" 1615 PRINT "DUE TO THIS EXTREME MISMANAGEMENT, YOU HAVE NOT ONLY" 1620 PRINT "BEEN IMPEACHED AND THROWN OUT OF OFFICE, BUT YOU" 1622 M6=INT(RND(1)*10) 1625 IF M6<=3 THEN 1670 1630 IF M6<=6 THEN 1680 1635 IF M6<=10 THEN 1690 1670 PRINT "ALSO HAD YOUR LEFT EYE GOUGED OUT!" 1672 GOTO 1590 1680 PRINT "HAVE ALSO GAINED A VERY BAD REPUTATION." 1682 GOTO 1590 1690 PRINT "HAVE ALSO BEEN DECLARED NATIONAL FINK." 1692 GOTO 1590 1700 PRINT 1702 PRINT 1710 PRINT "OVER ONE THIRD OF THE POPULTATION HAS DIED SINCE YOU" 1715 PRINT "WERE ELECTED TO OFFICE. THE PEOPLE (REMAINING)" 1720 PRINT "HATE YOUR GUTS." 1730 GOTO 1570 1800 IF B5-F1<2 THEN 1515 1807 PRINT 1815 PRINT "MONEY WAS LEFT OVER IN THE TREASURY WHICH YOU DID" 1820 PRINT "NOT SPEND. AS A RESULT, SOME OF YOUR COUNTRYMEN DIED" 1825 PRINT "OF STARVATION. THE PUBLIC IS ENRAGED AND YOU HAVE" 1830 PRINT "BEEN FORCED TO EITHER RESIGN OR COMMIT SUICIDE." 1835 PRINT "THE CHOICE IS YOURS." 1840 PRINT "IF YOU CHOOSE THE LATTER, PLEASE TURN OFF YOUR COMPUTER" 1845 PRINT "BEFORE PROCEEDING." 1850 GOTO 1590 1900 PRINT 1902 PRINT 1920 PRINT "CONGRATULATIONS!!!!!!!!!!!!!!!!!!" 1925 PRINT "YOU HAVE SUCCESFULLY COMPLETED YOUR";N5;"YEAR TERM" 1930 PRINT "OF OFFICE. YOU WERE, OF COURSE, EXTREMELY LUCKY, BUT" 1935 PRINT "NEVERTHELESS, IT'S QUITE AN ACHIEVEMENT. GOODBYE AND GOOD" 1940 PRINT "LUCK - YOU'LL PROBABLY NEED IT IF YOU'RE THE TYPE THAT" 1945 PRINT "PLAYS THIS GAME." 1950 GOTO 1590 1960 PRINT "HOW MANY YEARS HAD YOU BEEN IN OFFICE WHEN INTERRUPTED"; 1961 INPUT X5 1962 IF X5<0 THEN 1590 1963 IF X5<8 THEN 1969 1965 PRINT " COME ON, YOUR TERM IN OFFICE IS ONLY";N5;"YEARS." 1967 GOTO 1960 1969 PRINT "HOW MUCH DID YOU HAVE IN THE TREASURY"; 1970 INPUT A 1971 IF A<0 THEN 1590 1975 PRINT "HOW MANY COUNTRYMEN"; 1976 INPUT B 1977 IF B<0 THEN 1590 1980 PRINT "HOW MANY WORKERS"; 1981 INPUT C 1982 IF C<0 THEN 1590 1990 PRINT "HOW MANY SQUARE MILES OF LAND"; 1991 INPUT D 1992 IF D<0 THEN 1590 1993 IF D>2000 THEN 1996 1994 IF D>1000 THEN 100 1996 PRINT " COME ON, YOU STARTED WITH 1000 SQ. MILES OF FARM LAND" 1997 PRINT " AND 10,000 SQ. MILES OF FOREST LAND." 1998 GOTO 1990 2000 X5=X5+1 2020 B5=0 2040 GOTO 100 2046 END 2 PRINT TAB(34);"LEM" 4 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 7 REM ROCKT2 IS AN INTERACTIVE GAME THAT SIMULATES A LUNAR 8 REM LANDING IS SIMILAR TO THAT OF THE APOLLO PROGRAM. 9 REM THERE IS ABSOLUTELY NO CHANCE INVOLVED 10 Z$="GO" 15 B1=1 20 M=17.95 25 F1=5.25 30 N=7.5 35 R0=926 40 V0=1.29 45 T=0 50 H0=60 55 R=R0+H0 60 A=-3.425 65 R1=0 70 A1=8.84361E-04 75 R3=0 80 A3=0 85 M1=7.45 90 M0=M1 95 B=750 100 T1=0 105 F=0 110 P=0 115 N=1 120 M2=0 125 S=0 130 C=0 135 IF Z$="YES" THEN 1150 140 PRINT 145 PRINT "LUNAR LANDING SIMULATION" 150 PRINT 155 PRINT "HAVE YOU FLOWN AN APOLLO/LEM MISSION BEFORE"; 160 PRINT " (YES OR NO)"; 165 INPUT Q$ 170 IF Q$="YES" THEN 190 175 IF Q$="NO" THEN 205 180 PRINT "JUST ANSWER THE QUESTION, PLEASE, "; 185 GOTO 160 190 PRINT 195 PRINT "INPUT MEASUREMENT OPTION NUMBER"; 200 GOTO 225 205 PRINT 210 PRINT "WHICH SYSTEM OF MEASUREMENT DO YOU PREFER?" 215 PRINT " 1=METRIC 0=ENGLISH" 220 PRINT "ENTER THE APPROPRIATE NUMBER"; 225 INPUT K 230 PRINT 235 IF K=0 THEN 280 240 IF K=1 THEN 250 245 GOTO 220 250 Z=1852.8 255 M$="METERS" 260 G3=3.6 265 N$=" KILOMETERS" 270 G5=1000 275 GOTO 305 280 Z=6080 285 M$="FEET" 290 G3=.592 295 N$="N.MILES" 300 G5=Z 305 IF B1=3 THEN 670 310 IF Q$="YES" THEN 485 315 PRINT 320 PRINT " YOU ARE ON A LUNAR LANDING MISSION. AS THE PILOT OF" 325 PRINT "THE LUNAR EXCURSION MODULE, YOU WILL BE EXPECTED TO" 330 PRINT "GIVE CERTAIN COMMANDS TO THE MODULE NAVIGATION SYSTEM." 335 PRINT "THE ON-BOARD COMPUTER WILL GIVE A RUNNING ACCOUNT" 340 PRINT "OF INFORMATION NEEDED TO NAVIGATE THE SHIP." 345 PRINT 350 PRINT 355 PRINT "THE ATTITUDE ANGLE CALLED FOR IS DESCRIBED AS FOLLOWS." 360 PRINT "+ OR -180 DEGREES IS DIRECTLY AWAY FROM THE MOON" 365 PRINT "-90 DEGREES IS ON A TANGENT IN THE DIRECTION OF ORBIT" 370 PRINT "+90 DEGREES IS ON A TANGENT FROM THE DIRECTION OF ORBIT" 375 PRINT "0 (ZERO) DEGREES IS DIRECTLY TOWARD THE MOON" 380 PRINT 385 PRINT TAB(30);"-180|+180" 390 PRINT TAB(34);"^" 395 PRINT TAB(27);"-90 < -+- > +90" 400 PRINT TAB(34);"!" 405 PRINT TAB(34);"0" 410 PRINT TAB(21);"<<<< DIRECTION OF ORBIT <<<<" 415 PRINT 420 PRINT TAB(20);"------ SURFACE OF MOON ------" 425 PRINT 430 PRINT 435 PRINT "ALL ANGLES BETWEEN -180 AND +180 DEGREES ARE ACCEPTED." 440 PRINT 445 PRINT "1 FUEL UNIT = 1 SEC. AT MAX THRUST" 450 PRINT "ANY DISCREPANCIES ARE ACCOUNTED FOR IN THE USE OF FUEL" 455 PRINT "FOR AN ATTITUDE CHANGE." 460 PRINT "AVAILABLE ENGINE POWER: 0 (ZERO) AND ANY VALUE BETWEEN" 465 PRINT "10 AND 100 PERCENT." 470 PRINT 475 PRINT"NEGATIVE THRUST OR TIME IS PROHIBITED." 480 PRINT 485 PRINT 490 PRINT "INPUT: TIME INTERVAL IN SECONDS ------ (T)" 495 PRINT " PERCENTAGE OF THRUST ---------- (P)" 500 PRINT " ATTITUDE ANGLE IN DEGREES ----- (A)" 505 PRINT 510 IF Q$="YES" THEN 535 515 PRINT "FOR EXAMPLE:" 520 PRINT "T,P,A? 10,65,-60" 525 PRINT "TO ABORT THE MISSION AT ANY TIME, ENTER 0,0,0" 530 PRINT 535 PRINT "OUTPUT: TOTAL TIME IN ELAPSED SECONDS" 540 PRINT " HEIGHT IN ";M$ 545 PRINT " DISTANCE FROM LANDING SITE IN ";M$ 550 PRINT " VERTICAL VELOCITY IN ";M$;"/SECOND" 555 PRINT " HORIZONTAL VELOCITY IN ";M$;"/SECOND" 560 PRINT " FUEL UNITS REMAINING" 565 PRINT 570 GOTO 670 575 PRINT 580 PRINT "T,P,A"; 585 INPUT T1,F,P 590 F=F/100 595 IF T1<0 THEN 905 600 IF T1=0 THEN 1090 605 IF ABS(F-.05)>1 THEN 945 610 IF ABS(F-.05)<.05 THEN 945 615 IF ABS(P)>180 THEN 925 620 N=20 625 IF T1<400 THEN 635 630 N=T1/20 635 T1=T1/N 640 P=P*3.14159/180 645 S=SIN(P) 650 C=COS(P) 655 M2=M0*T1*F/B 660 R3=-.5*R0*((V0/R)^2)+R*A1*A1 665 A3=-2*R1*A1/R 670 FOR I=1 TO N 675 IF M1=0 THEN 715 680 M1=M1-M2 685 IF M1>0 THEN 725 690 F=F*(1+M1/M2) 695 M2=M1+M2 700 PRINT "YOU ARE OUT OF FUEL." 705 M1=0 710 GOTO 725 715 F=0 720 M2=0 725 M=M-.5*M2 730 R4=R3 735 R3=-.5*R0*((V0/R)^2)+R*A1*A1 740 R2=(3*R3-R4)/2+.00526*F1*F*C/M 745 A4=A3 750 A3=-2*R1*A1/R 755 A2=(3*A3-A4)/2+.0056*F1*F*S/(M*R) 760 X=R1*T1+.5*R2*T1*T1 765 R=R+X 770 H0=H0+X 775 R1=R1+R2*T1 780 A=A+A1*T1+.5*A2*T1*T1 785 A1=A1+A2*T1 790 M=M-.5*M2 795 T=T+T1 800 IF H0<3.287828E-04 THEN 810 805 NEXT I 810 H=H0*Z 815 H1=R1*Z 820 D=R0*A*Z 825 D1=R*A1*Z 830 T2=M1*B/M0 835 PRINT " ";T;TAB(10);H;TAB(23);D; 840 PRINT TAB(37);H1;TAB(49);D1;TAB(60);T2 845 IF H0<3.287828E-04 THEN 880 850 IF R0*A>164.474 THEN 1050 855 IF M1>0 THEN 580 860 T1=20 865 F=0 870 P=0 875 GOTO 620 880 IF R1<-8.21957E-04 THEN 1020 885 IF ABS(R*A1)>4.93174E-04 THEN 1020 890 IF H0<-3.287828E-04 THEN 1020 895 IF ABS(D)>10*Z THEN 1065 900 GOTO 995 905 PRINT 910 PRINT "THIS SPACECRAFT IS NOT ABLE TO VIOLATE THE SPACE-"; 915 PRINT "TIME CONTINUUM." 920 GOTO 575 925 PRINT 930 PRINT "IF YOU WANT TO SPIN AROUND, GO OUTSIDE THE MODULE" 935 PRINT "FOR AN E.V.A." 940 GOTO 575 945 PRINT 950 PRINT "IMPOSSIBLE THRUST VALUE "; 955 IF F<0 THEN 985 960 IF F-.05<.05 THEN 975 965 PRINT "TOO LARGE" 970 GOTO 575 975 PRINT "TOO SMALL" 980 GOTO 575 985 PRINT "NEGATIVE" 990 GOTO 575 995 PRINT 1000 PRINT "TRANQUILITY BASE HERE -- THE EAGLE HAS LANDED." 1005 PRINT "CONGRATULATIONS -- THERE WAS NO SPACECRAFT DAMAGE." 1010 PRINT "YOU MAY NOW PROCEED WITH SURFACE EXPLORATION." 1015 GOTO 1100 1020 PRINT 1025 PRINT "CRASH !!!!!!!!!!!!!!!!" 1030 PRINT "YOUR IMPACT CREATED A CRATER";ABS(H);M$;" DEEP." 1035 X1=SQR(D1*D1+H1*H1)*G3 1040 PRINT "AT CONTACT YOU WERE TRAVELING";X1;N$;"/HR" 1045 GOTO 1100 1050 PRINT 1055 PRINT "YOU HAVE BEEN LOST IN SPACE WITH NO HOPE OF RECOVERY." 1060 GOTO 1100 1065 PRINT "YOU ARE DOWN SAFELY - " 1075 PRINT 1080 PRINT "BUT MISSED THE LANDING SITE BY";ABS(D/G5);N$;"." 1085 GOTO 1100 1090 PRINT 1095 PRINT "MISSION ABENDED" 1100 PRINT 1105 PRINT "DO YOU WANT TO TRY IT AGAIN (YES/NO)?" 1110 INPUT Z$ 1115 IF Z$="YES" THEN 20 1120 IF Z$="NO" THEN 1130 1125 GOTO 1105 1130 PRINT 1135 PRINT "TOO BAD, THE SPACE PROGRAM HATES TO LOSE EXPERIENCED" 1140 PRINT "ASTRONAUTS." 1145 STOP 1150 PRINT 1155 PRINT "OK, DO YOU WANT THE COMPLETE INSTRUCTIONS OR THE INPUT -" 1160 PRINT "OUTPUT STATEMENTS?" 1165 PRINT "1=COMPLETE INSTRUCTIONS" 1170 PRINT "2=INPUT-OUTPUT STATEMENTS" 1175 PRINT "3=NEITHER" 1180 INPUT B1 1185 Q$="NO" 1190 IF B1=1 THEN 205 1195 Q$="YES" 1200 IF B1=2 THEN 190 1205 IF B1=3 THEN 190 1210 GOTO 1165 1215 END 10 PRINT TAB(33);"LETTER" 20 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 30 PRINT:PRINT:PRINT 100 PRINT "LETTER GUESSING GAME": PRINT 210 PRINT "I'LL THINK OF A LETTER OF THE ALPHABET, A TO Z." 220 PRINT "TRY TO GUESS MY LETTER AND I'LL GIVE YOU CLUES" 230 PRINT "AS TO HOW CLOSE YOU'RE GETTING TO MY LETTER." 310 L=65+INT(RND(1)*26) 320 G=0 340 PRINT: PRINT "O.K., I HAVE A LETTER. START GUESSING." 410 PRINT: PRINT "WHAT IS YOUR GUESS"; 420 G=G+1 430 INPUT A$: A=ASC(A$): PRINT 440 IF A=L THEN 500 450 IF A>L THEN 480 460 PRINT "TOO LOW. TRY A HIGHER LETTER.": GOTO 410 480 PRINT "TOO HIGH. TRY A LOWER LETTER.": GOTO 410 500 PRINT: PRINT "YOU GOT IT IN";G;"GUESSES!!" 504 IF G<=5 THEN 508 506 PRINT "BUT IT SHOULDN'T TAKE MORE THAN 5 GUESSES!": GOTO 515 508 PRINT "GOOD JOB !!!!!" 510 FOR N=1 TO 15: PRINT CHR$(7);: NEXT N 515 PRINT 520 PRINT "LET'S PLAN AGAIN....." 530 GOTO 310 999 END 2 PRINT TAB(34);"LIFE" 4 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 6 PRINT: PRINT: PRINT 8 PRINT "ENTER YOUR PATTERN:" 9 X1=1: Y1=1: X2=24: Y2=70 10 DIM A(24,70),B$(24) 20 C=1 30 INPUT B$(C) 40 IF B$(C)="DONE" THEN B$(C)="": GOTO 80 50 IF LEFT$(B$(C),1)="." THEN B$(C)=" "+RIGHT$(B$(C),LEN(B$(C))-1) 60 C=C+1 70 GOTO 30 80 C=C-1: L=0 90 FOR X=1 TO C-1 100 IF LEN(B$(X))>L THEN L=LEN(B$(X)) 110 NEXT X 120 X1=11-C/2 130 Y1=33-L/2 140 FOR X=1 TO C 150 FOR Y=1 TO LEN(B$(X)) 160 IF MID$(B$(X),Y,1)<>" " THEN A(X1+X,Y1+Y)=1:P=P+1 170 NEXT Y 180 NEXT X 200 PRINT:PRINT:PRINT 210 PRINT "GENERATION:";G,"POPULATION:";P;: IF I9 THEN PRINT "INVALID!"; 215 X3=24:Y3=70:X4=1: Y4=1: P=0 220 G=G+1 225 FOR X=1 TO X1-1: PRINT: NEXT X 230 FOR X=X1 TO X2 240 PRINT 250 FOR Y=Y1 TO Y2 253 IF A(X,Y)=2 THEN A(X,Y)=0:GOTO 270 256 IF A(X,Y)=3 THEN A(X,Y)=1:GOTO 261 260 IF A(X,Y)<>1 THEN 270 261 PRINT TAB(Y);"*"; 262 IF X<X3 THEN X3=X 264 IF X>X4 THEN X4=X 266 IF Y<Y3 THEN Y3=Y 268 IF Y>Y4 THEN Y4=Y 270 NEXT Y 290 NEXT X 295 FOR X=X2+1 TO 24: PRINT: NEXT X 299 X1=X3: X2=X4: Y1=Y3: Y2=Y4 301 IF X1<3 THEN X1=3:I9=-1 303 IF X2>22 THEN X2=22:I9=-1 305 IF Y1<3 THEN Y1=3:I9=-1 307 IF Y2>68 THEN Y2=68:I9=-1 309 P=0 500 FOR X=X1-1 TO X2+1 510 FOR Y=Y1-1 TO Y2+1 520 C=0 530 FOR I=X-1 TO X+1 540 FOR J=Y-1 TO Y+1 550 IF A(I,J)=1 OR A(I,J)=2 THEN C=C+1 560 NEXT J 570 NEXT I 580 IF A(X,Y)=0 THEN 610 590 IF C<3 OR C>4 THEN A(X,Y)=2: GOTO 600 595 P=P+1 600 GOTO 620 610 IF C=3 THEN A(X,Y)=3:P=P+1 620 NEXT Y 630 NEXT X 635 X1=X1-1:Y1=Y1-1:X2=X2+1:Y2=Y2+1 640 GOTO 210 650 END 2 PRINT TAB(33);"LIFE2" 4 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 6 PRINT: PRINT: PRINT 7 DIM N(6,6),K(18),A(16),X(2),Y(2) 8 DATA 3,102,103,120,130,121,112,111,12 9 DATA 21,30,1020,1030,1011,1021,1003,1002,1012 10 FOR M=1 TO 18: READ K(M): NEXT M 13 DATA -1,0,1,0,0,-1,0,1,-1,-1,1,-1,-1,1,1,1 14 FOR O1= 1 TO 16: READ A(O1): NEXT O1 20 GOTO 500 50 FOR J=1 TO 5 51 FOR K=1 TO 5 55 IF N(J,K)>99 THEN GOSUB 200 60 NEXT K 65 NEXT J 90 K=0: M2=0: M3=0 99 FOR J=0 TO 6: PRINT 100 FOR K=0 TO 6 101 IF J<>0 THEN IF J<>6 THEN 105 102 IF K=6 THEN PRINT 0;: GOTO 125 103 PRINT K;: GOTO 120 105 IF K<>0 THEN IF K<>6 THEN 110 106 IF J=6 THEN PRINT 0: GOTO 126 107 PRINT J;: GOTO 120 110 GOSUB 300 120 NEXT K 125 NEXT J 126 RETURN 200 B=1: IF N(J,K)>999 THEN B=10 220 FOR O1= 1 TO 15 STEP 2 230 N(J+A(O1),K+A(O1+1))=N(J+A(O1),K+A(O1+1))+B 231 NEXT O1 239 RETURN 300 IF N(J,K)<3 THEN 399 305 FOR O1=1 TO 18 310 IF N(J,K)=K(O1) THEN 350 315 NEXT O1 320 GOTO 399 350 IF O1>9 THEN 360 351 N(J,K)=100: M2=M2+1: PRINT " * "; 355 RETURN 360 N(J,K)=1000: M3=M3+1: PRINT " # "; 365 RETURN 399 N(J,K)=0: PRINT " ";: RETURN 500 PRINT TAB(10);"U.B. LIFE GAME" 505 M2=0: M3=0 510 FOR J=1 TO 5 511 FOR K=1 TO 5 515 N(J,K)=0 516 NEXT K 517 NEXT J 519 FOR B=1 TO 2: P1=3: IF B=2 THEN P1=30 520 PRINT:PRINT "PLAYER";B;" - 3 LIVE PIECES." 535 FOR K1=1 TO 3: GOSUB 700 540 N(X(B),Y(B))=P1: NEXT K1 542 NEXT B 559 GOSUB 90 560 PRINT: GOSUB 50 570 IF M2=0 THEN IF M3=0 THEN 574 571 IF M3=0 THEN B=1: GOTO 575 572 IF M2=0 THEN B=2: GOTO 575 573 GOTO 580 574 PRINT: PRINT "A DRAW":GOTO 800 575 PRINT: PRINT "PLAYER";B;"IS THE WINNER":GOTO 800 580 FOR B=1 TO 2: PRINT: PRINT: PRINT "PLAYER";B;: GOSUB 700 581 IF B=99 THEN 560 582 NEXT B 586 N(X(1),Y(1))=100: N(X(2),Y(2))=1000 596 GOTO 560 700 PRINT "X,Y":PRINT"XXXXXX";CHR$(13);"$$$$$$";CHR$(13);"&&&&&&"; 701 PRINT CHR$(13);: INPUT Y(B),X(B) 705 IF X(B)<=5 THEN IF X(B)>0 THEN 708 706 GOTO 750 708 IF Y(B)<=5 THEN IF Y(B)>0 THEN 715 710 GOTO 750 715 IF N(X(B),Y(B))<>0 THEN 750 720 IF B=1 THEN RETURN 725 IF X(1)=X(2) THEN IF Y(1)=Y(2) THEN 740 730 RETURN 740 PRINT "SAME COORD. SET TO 0" 741 N(X(B)+1,Y(B)+1)=0: B=99: RETURN 750 PRINT "ILLEGAL COORDS. RETYPE": GOTO 700 999 END 1 PRINT TAB(25);"LITERATURE QUIZ" 2 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 3 PRINT:PRINT:PRINT 5 R=0 10 PRINT "TEST YOUR KNOWLEDGE OF CHILDREN'S LITERATURE." 12 PRINT: PRINT "THIS IS A MULTIPLE-CHOICE QUIZ." 13 PRINT "TYPE A 1, 2, 3, OR 4 AFTER THE QUESTION MARK." 15 PRINT: PRINT "GOOD LUCK!": PRINT: PRINT 40 PRINT "IN PINOCCHIO, WHAT WAS THE NAME OF THE CAT" 42 PRINT "1)TIGGER, 2)CICERO, 3)FIGARO, 4)GUIPETTO"; 43 INPUT A: IF A=3 THEN 46 44 PRINT "SORRY...FIGARO WAS HIS NAME.": GOTO 50 46 PRINT "VERY GOOD! HERE'S ANOTHER." 47 R=R+1 50 PRINT: PRINT 51 PRINT "FROM WHOSE GARDEN DID BUGS BUNNY STEAL THE CARROTS?" 52 PRINT "1)MR. NIXON'S, 2)ELMER FUDD'S, 3)CLEM JUDD'S, 4)STROMBOLI'S"; 53 INPUT A: IF A=2 THEN 56 54 PRINT "TOO BAD...IT WAS ELMER FUDD'S GARDEN.": GOTO 60 56 PRINT "PRETTY GOOD!" 57 R=R+1 60 PRINT: PRINT 61 PRINT "IN THE WIZARD OF OS, DOROTHY'S DOG WAS NAMED" 62 PRINT "1)CICERO, 2)TRIXIA, 3)KING, 4)TOTO"; 63 INPUT A: IF A=4 THEN 66 64 PRINT "BACK TO THE BOOKS,...TOTO WAS HIS NAME.": GOTO 70 66 PRINT "YEA! YOU'RE A REAL LITERATURE GIANT." 67 R=R+1 70 PRINT:PRINT 71 PRINT "WHO WAS THE FAIR MAIDEN WHO ATE THE POISON APPLE" 72 PRINT "1)SLEEPING BEAUTY, 2)CINDERELLA, 3)SNOW WHITE, 4)WENDY"; 73 INPUT A: IF A=3 THEN 76 74 PRINT "OH, COME ON NOW...IT WAS SNOW WHITE." 75 GOTO 80 76 PRINT "GOOD MEMORY!" 77 R=R+1 80 PRINT:PRINT 85 IF R=4 THEN 100 90 IF R<2 THEN 200 92 PRINT "NOT BAD, BUT YOU MIGHT SPEND A LITTLE MORE TIME" 94 PRINT "READING THE NURSERY GREATS." 96 STOP 100 PRINT "WOW! THAT'S SUPER! YOU REALLY KNOW YOUR NURSERY" 110 PRINT "YOUR NEXT QUIZ WILL BE ON 2ND CENTURY CHINESE" 120 PRINT "LITERATURE (HA, HA, HA)" 130 STOP 200 PRINT "UGH. THAT WAS DEFINITELY NOT TOO SWIFT. BACK TO" 205 PRINT "NURSERY SCHOOL FOR YOU, MY FRIEND." 999 END 2 PRINT TAB(33);"LOVE" 4 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 6 PRINT: PRINT: PRINT 20 PRINT "A TRIBUTE TO THE GREAT AMERICAN ARTIST, ROBERT INDIANA." 30 PRINT "HIS GREATEST WORK WILL BE REPRODUCED WITH A MESSAGE OF" 40 PRINT "YOUR CHOICE UP TO 60 CHARACTERS. IF YOU CAN'T THINK OF" 50 PRINT "A MESSAGE, SIMPLE TYPE THE WORD 'LOVE'": PRINT 60 INPUT "YOUR MESSAGE, PLEASE";A$: L=LEN(A$) 70 DIM T$(120): FOR I=1 TO 10: PRINT: NEXT I 100 FOR J=0 TO INT(60/L) 110 FOR I=1 TO L 120 T$(J*L+I)=MID$(A$,I,1) 130 NEXT I: NEXT J 140 C=0 200 A1=1: P=1: C=C+1: IF C=37 THEN 999 205 PRINT 210 READ A: A1=A1+A: IF P=1 THEN 300 240 FOR I=1 TO A: PRINT " ";: NEXT I: P=1: GOTO 400 300 FOR I=A1-A TO A1-1: PRINT T$(I);: NEXT I: P=0 400 IF A1>60 THEN 200 410 GOTO 210 600 DATA 60,1,12,26,9,12,3,8,24,17,8,4,6,23,21,6,4,6,22,12,5,6,5 610 DATA 4,6,21,11,8,6,4,4,6,21,10,10,5,4,4,6,21,9,11,5,4 620 DATA 4,6,21,8,11,6,4,4,6,21,7,11,7,4,4,6,21,6,11,8,4 630 DATA 4,6,19,1,1,5,11,9,4,4,6,19,1,1,5,10,10,4,4,6,18,2,1,6,8,11,4 640 DATA 4,6,17,3,1,7,5,13,4,4,6,15,5,2,23,5,1,29,5,17,8 650 DATA 1,29,9,9,12,1,13,5,40,1,1,13,5,40,1,4,6,13,3,10,6,12,5,1 660 DATA 5,6,11,3,11,6,14,3,1,5,6,11,3,11,6,15,2,1 670 DATA 6,6,9,3,12,6,16,1,1,6,6,9,3,12,6,7,1,10 680 DATA 7,6,7,3,13,6,6,2,10,7,6,7,3,13,14,10,8,6,5,3,14,6,6,2,10 690 DATA 8,6,5,3,14,6,7,1,10,9,6,3,3,15,6,16,1,1 700 DATA 9,6,3,3,15,6,15,2,1,10,6,1,3,16,6,14,3,1,10,10,16,6,12,5,1 710 DATA 11,8,13,27,1,11,8,13,27,1,60 999 FOR I=1 TO 10: PRINT: NEXT I: END 10 PRINT TAB(33);"LUNAR" 20 PRINT TAB(l5);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 25 PRINT:PRINT:PRINT 30 PRINT "THIS IS A COMPUTER SIMULATION OF AN APOLLO LUNAR" 40 PRINT "LANDING CAPSULE.": PRINT: PRINT 50 PRINT "THE ON-BOARD COMPUTER HAS FAILED (IT WAS MADE BY" 60 PRINT "XEROX) SO YOU HAVE TO LAND THE CAPSULE MANUALLY." 70 PRINT: PRINT "SET BURN RATE OF RETRO ROCKETS TO ANY VALUE BETWEEN" 80 PRINT "0 (FREE FALL) AND 200 (MAXIMUM BURN) POUNDS PER SECOND." 90 PRINT "SET NEW BURN RATE EVERY 10 SECONDS.": PRINT 100 PRINT "CAPSULE WEIGHT 32,500 LBS; FUEL WEIGHT 16,500 LBS." 110 PRINT: PRINT: PRINT: PRINT "GOOD LUCK" 120 L=0 130 PRINT: PRINT "SEC","MI + FT","MPH","LB FUEL","BURN RATE":PRINT 140 A=120:V=1:M=33000:N=16500:G=1E-03:Z=1.8 150 PRINT L,INT(A);INT(5280*(A-INT(A))),3600*V,M-N,:INPUT K:T=10 160 IF M-N<1E-03 THEN 240 170 IF T<1E-03 THEN 150 180 S=T: IF M>=N+S*K THEN 200 190 S=(M-N)/K 200 GOSUB 420: IF I<=O THEN 340 210 IF V<=0 THEN 230 220 IF J<0 THEN 370 230 GOSUB 330: GOTO 160 240 PRINT "FUEL OUT AT";L;"SECONDS":S=(-V+SQR(V*V+2*A*G))/G 250 V=V+G*S: L=L+S 260 W=3600*V: PRINT "ON MOON AT";L;"SECONDS - IMPACT VELOCITY";W;"MPH" 274 IF W<=1.2 THEN PRINT "PERFECT LANDING!": GOTO 440 280 IF W<=10 THEN PRINT "GOOD LANDING (COULD RE BETTER)":GOTO 440 282 IF W>60 THEN 300 284 PRINT "CRAFT DAMAGE... YOU'RE STRANDED HERE UNTIL A RESCUE" 286 PRINT "PARTY ARRIVES. HOPE YOU HAVE ENOUGH OXYGEN!" 288 GOTO 440 300 PRINT "SORRY THERE NERE NO SURVIVORS. YOU BLOW IT!" 310 PRINT "IN FACT, YOU BLASTED A NEW LUNAR CRATER";W*.227;"FEET DEEP!" 320 GOTO 440 330 L=L+S: T=T-S: M=M-S*K: A=I: V=J: RETURN 340 IF S<5E-03 THEN 260 350 D=V+SQR(V*V+2*A*(G-Z*K/M)):S=2*A/D 360 GOSUB 420: GOSUB 330: GOTO 340 370 W=(1-M*G/(Z*K))/2: S=M*V/(Z*K*(W+SQR(W*W+V/Z)))+.05:GOSUB 420 380 IF I<=0 THEN 340 390 GOSUB 330: IF J>0 THEN 160 400 IF V>0 THEN 370 410 GOTO 160 420 Q=S*K/M: J=V+G*S+Z*(-Q-Q*Q/2-Q^3/3-Q^4/4-Q^5/5) 430 I=A-G*S*S/2-V*S+Z*S*(Q/2+Q^2/6+Q^3/12+Q^4/20+Q^5/30):RETURN 440 PRINT:PRINT:PRINT:PRINT "TRY AGAIN??": GOTO 70 2 PRINT TAB(30);"MASTERMIND" 4 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 6 PRINT: PRINT: PRINT 10 REM 20 REM MASTERMIND II 30 REM STEVE NORTH 40 REM CREATIVE COMPUTING 50 REM PO BOX 789-M MORRISTOWN NEW JERSEY 07960 60 REM 70 REM 80 INPUT "NUMBER OF COLORS";C9 90 IF C9>8 THEN PRINT "NO MORE THAN 8, PLEASE!":GOTO 80 100 INPUT "NUMBER OF POSITIONS";P9 110 INPUT "NUMBER OF ROUNDS";R9 120 P=C9^P9 130 PRINT "TOTAL POSSIBILITIES =";P 140 H=0:C=0 150 DIM Q(P9),S(10,2),S$(10),A$(P9),G$(P9),I(P),H$(P9) 160 L$="BWRGOYPT" 170 PRINT 180 PRINT 190 PRINT "COLOR LETTER" 200 PRINT "===== ======" 210 FOR X=1 TO C9 220 READ X$ 230 PRINT X$;TAB(13);MID$(L$,X,1) 240 NEXT X 250 PRINT 260 FOR R=1 TO R9 270 PRINT 280 PRINT "ROUND NUMBER";R;"----" 290 PRINT 300 PRINT "GUESS MY COMBINATION.":PRINT 310 REM GET A COMBINATION 320 A=INT(P*RND(1)+1) 330 GOSUB 3000 340 FOR X=1 TO A 350 GOSUB 3500 360 NEXT X 370 FOR M=1 TO 10 380 PRINT "MOVE # ";M;" GUESS ";:INPUT X$ 390 IF X$="BOARD" THEN 2000 400 IF X$="QUIT" THEN 2500 410 IF LEN(X$)<>P9 THEN PRINT "BAD NUMBER OF POSITIONS.":GOTO 380 420 REM UNPACK X$ INTO G$(1-P9) 430 FOR X=1 TO P9 440 FOR Y=1 TO C9 450 IF MID$(X$,X,1)=MID$(L$,Y,1) THEN 480 460 NEXT Y 470 PRINT "'"; MID$(X$,X,1); "' IS UNRECOGNIZED.":GOTO 380 480 G$(X)=MID$(X$,X,1) 490 NEXT X 500 REM NOW WE CONVERT Q(1-P9) INTO A$(1-P9) [ACTUAL GUESS] 510 GOSUB 4000 520 REM AND GET NUMBER OF BLACKS AND WHITES 530 GOSUB 4500 540 IF B=P9 THEN 630 550 REM TELL HUMAN RESULTS 560 PRINT "YOU HAVE ";B;" BLACKS AND ";W;" WHITES." 570 REM SAVE ALL THIS STUFF FOR BOARD PRINTOUT LATER 580 S$(M)=X$ 590 S(M,1)=B 600 S(M,2)=W 610 NEXT M 620 PRINT "YOU RAN OUT OF MOVES! THAT'S ALL YOU GET!":GOTO 640 622 GOSUB 4000 623 PRINT "THE ACTUAL COMBINATION WAS: "; 624 FOR X=1 TO P9 625 PRINT A$(X); 626 NEXT X 627 PRINT 630 PRINT "YOU GUESSED IT IN ";M;" MOVES!" 640 H=H+M 650 GOSUB 5000 660 REM 670 REM NOW COMPUTER GUESSES 680 REM 690 FOR X=1 TO P 700 I(X)=1 710 NEXT X 720 PRINT "NOW I GUESS. THINK OF A COMBINATION." 730 INPUT "HIT RETURN WHEN READY:";X$ 740 FOR M=1 TO 10 750 GOSUB 3000 760 REM FIND A GUESS 770 G=INT(P*RND(1)+1) 780 IF I(G)=1 THEN 890 790 FOR X=G TO P 800 IF I(X)=1 THEN 880 810 NEXT X 820 FOR X=1 TO G 830 IF I(X)=1 THEN 880 840 NEXT X 850 PRINT "YOU HAVE GIVEN ME INCONSISTENT INFORMATION." 860 PRINT "TRY AGAIN, AND THIS TIME PLEASE BE MORE CAREFUL." 870 GOTO 660 880 G=X 890 REM NOW WE CONVERT GUESS #G INTO G$ 900 FOR X=1 TO G 910 GOSUB 3500 920 NEXT X 930 GOSUB 6000 940 PRINT "MY GUESS IS: "; 950 FOR X=1 TO P9 960 PRINT H$(X); 970 NEXT X 980 INPUT " BLACKS, WHITES ";B1,W1 990 IF B1=P9 THEN 1120 1000 GOSUB 3000 1010 FOR X=1 TO P 1020 GOSUB 3500 1030 IF I(X)=0 THEN 1070 1035 GOSUB 6500 1040 GOSUB 4000 1050 GOSUB 4500 1060 IF B1<>B OR W1<>W THEN I(X)=0 1070 NEXT X 1080 NEXT M 1090 PRINT "I USED UP ALL MY MOVES!" 1100 PRINT "I GUESS MY CPU IS JUST HAVING AN OFF DAY." 1110 GOTO 1130 1120 PRINT "I GOT IT IN ";M;" MOVES!" 1130 C=C+M 1140 GOSUB 5000 1150 NEXT R 1160 PRINT "GAME OVER" 1170 PRINT "FINAL SCORE:" 1180 GOSUB 5040 1190 STOP 2000 REM 2010 REM BOARD PRINTOUT ROUTINE 2020 REM 2025 PRINT 2030 PRINT "BOARD" 2040 PRINT "MOVE GUESS BLACK WHITE" 2050 FOR Z=1 TO M-1 2060 PRINT Z;TAB(9);S$(Z);TAB(25);S(Z,1);TAB(35);S(Z,2) 2070 NEXT Z 2075 PRINT 2080 GOTO 380 2500 REM 2510 REM QUIT ROUTINE 2520 REM 2530 PRINT "QUITTER! MY COMBINATION WAS: "; 2535 GOSUB 4000 2540 FOR X=1 TO P9 2550 PRINT A$(X); 2560 NEXT X 2565 PRINT 2570 PRINT "GOOD BYE" 2580 STOP 3000 REM 3010 REM INITIALIZE Q(1-P9) TO ZEROS 3020 REM 3030 FOR S=1 TO P9 3040 Q(S)=0 3050 NEXT S 3060 RETURN 3500 REM 3510 REM INCREMENT Q(1-P9) 3520 REM 3522 IF Q(1)>0 THEN 3530 3524 REM IF ZERO, THIS IS OUR FIRST INCREMENT: MAKE ALL ONES 3526 FOR S=1 TO P9 3527 Q(S)=1 3528 NEXT S 3529 RETURN 3530 Q=1 3540 Q(Q)=Q(Q)+1 3550 IF Q(Q)<=C9 THEN RETURN 3560 Q(Q)=1 3570 Q=Q+1 3580 GOTO 3540 4000 REM 4010 REM CONVERT Q(1-P9) TO A$(1-P9) 4020 REM 4030 FOR S=1 TO P9 4040 A$(S)=MID$(L$,Q(S),1) 4050 NEXT S 4060 RETURN 4500 REM 4510 REM GET NUMBER OF BLACKS (B) AND WHITES (W) 4520 REM MASHES G$ AND A$ IN THE PROCESS 4530 REM 4540 B=0:W=0:F=0 4550 FOR S=1 TO P9 4560 IF G$(S)<>A$(S) THEN 4620 4570 B=B+1 4580 G$(S)=CHR$(F) 4590 A$(S)=CHR$(F+1) 4600 F=F+2 4610 GOTO 4660 4620 FOR T=1 TO P9 4630 IF G$(S)<>A$(T) THEN 4650 4640 IF G$(T)=A$(T) THEN 4650 4645 W=W+1:A$(T)=CHR$(F):G$(S)=CHR$(F+1):F=F+2:GOTO 4660 4650 NEXT T 4660 NEXT S 4670 RETURN 5000 REM 5010 REM PRINT SCORE 5020 REM 5030 PRINT "SCORE:" 5040 PRINT " COMPUTER ";C 5050 PRINT " HUMAN ";H 5060 PRINT 5070 RETURN 5500 REM 5510 REM CONVERT Q(1-P9) INTO G$(1-P9) 5520 REM 5530 FOR S=1 TO P9 5540 G$(S)=MID$(L$,Q(S),1) 5550 NEXT S 5560 RETURN 6000 REM 6010 REM CONVERT Q(1-P9) TO H$(1-P9) 6020 REM 6030 FOR S=1 TO P9 6040 H$(S)=MID$(L$,Q(S),1) 6050 NEXT S 6060 RETURN 6500 REM 6510 REM COPY H$ INTO G$ 6520 REM 6530 FOR S=1 TO P9 6540 G$(S)=H$(S) 6550 NEXT S 6560 RETURN 8000 REM PROGRAM DATA FOR COLOR NAMES 8010 DATA BLACK,WHITE,RED,GREEN,ORANGE,YELLOW,PURPLE,TAN 9998 REM ...WE'RE SORRY BUT IT'S TIME TO GO... 9999 END 10 PRINT TAB(31);"MATH DICE" 20 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 30 PRINT:PRINT:PRINT 40 PRINT "THIS PROGRAM GENERATES SUCCESIVE PICTURES OF TWO DICE." 50 PRINT "WHEN TWO DICE AND AN EQUAL SIGN FOLLOWED BY A QUESTION" 60 PRINT "MARK HAVE BEEN PRINTED, TYPE YOUR ANSWER AND THE RETURN KEY." 70 PRINT "TO CONCLUDE THE LESSON, TYPE CONTROL-C AS YOUR ANSWER." 80 PRINT 90 PRINT 100 N=N+1 110 D=INT(6*RND(1)+1) 120 PRINT" ----- " 130 IF D=1 THEN 200 140 IF D=2 THEN 180 150 IF D=3 THEN 180 160 PRINT "I * * I" 170 GOTO 210 180 PRINT "I * I" 190 GOTO 210 200 PRINT "I I" 210 IF D=2 THEN 260 220 IF D=4 THEN 260 230 IF D=6 THEN 270 240 PRINT "I * I" 250 GOTO 280 260 PRINT "I I" 265 GOTO 280 270 PRINT "I * * I" 280 IF D=1 THEN 350 290 IF D=2 THEN 330 300 IF D=3 THEN 330 310 PRINT "I * * I" 320 GOTO 360 330 PRINT "I * I" 340 GOTO 360 350 PRINT "I I" 360 PRINT " ----- " 370 PRINT 375 IF N=2 THEN 500 380 PRINT " +" 381 PRINT 400 A=D 410 GOTO 100 500 T=D+A 510 PRINT " ="; 520 INPUT T1 530 IF T1=T THEN 590 540 PRINT "NO, COUNT THE SPOTS AND GIVE ANOTHER ANSWER." 541 PRINT " ="; 550 INPUT T2 560 IF T2=T THEN 590 570 PRINT "NO, THE ANSWER IS";T 580 GOTO 600 590 PRINT "RIGHT!" 600 PRINT 601 PRINT "THE DICE ROLL AGAIN..." 610 PRINT 615 N=0 620 GOTO 100 999 END !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! ! ! MINE ! ! ! ! Mine is the classic game where a field of hidden mines is presented, and the ! ! user tries to find the mines based on mine counts in adjacent squares. ! ! ! ! Derived from the Pascal version. ! ! ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! helper defines false% = 0 true% = -1 ! colors black% = 0 white% = 1 red% = 2 green% = 3 blue% = 4 cyan% = 5 yellow% = 6 magenta% = 7 ! events etchar% = 0 ! ANSI character returned etup% = 1 ! cursor up one line etdown% = 2 ! down one line etleft% = 3 ! left one character etright% = 4 ! right one character etleftw% = 5 ! left one word etrightw% = 6 ! right one word ethome% = 7 ! home of document ethomes% = 8 ! home of screen ethomel% = 9 ! home of line etend% = 10 ! end of document etends% = 11 ! end of screen etendl% = 12 ! end of line etscrl% = 13 ! scroll left one character etscrr% = 14 ! scroll right one character etscru% = 15 ! scroll up one line etscrd% = 16 ! scroll down one line etpagd% = 17 ! page down etpagu% = 18 ! page up ettab% = 19 ! tab etenter% = 20 ! enter line etinsert% = 21 ! insert block etinsertl% = 22 ! insert line etinsertt% = 23 ! insert toggle etdel% = 24 ! delete block etdell% = 25 ! delete line etdelcf% = 26 ! delete character forward etdelcb% = 27 ! delete character backward etcopy% = 28 ! copy block etcopyl% = 29 ! copy line etcan% = 30 ! cancel current operation etstop% = 31 ! stop current operation etcont% = 32 ! continue current operation etprint% = 33 ! print document etprintb% = 34 ! print block etprints% = 35 ! print screen etfun% = 36 ! function key etmenu% = 46 ! display menu etmouba% = 47 ! mouse button assertion etmoubd% = 51 ! mouse button deassertion etmoumov% = 55 ! mouse move ettim% = 56 ! timer matures etjoyba% = 57 ! joystick button assertion etjoybd% = 58 ! joystick button deassertion etjoymov% = 59 ! joystick move etterm% = 60 ! terminate program ! program defines maxxs% = 8 ! size of grid maxys% = 8 maxmine% = 10 ! number of mines to place dim mine%(maxxs%, maxys%) ! mine exists map dim vis%(maxxs%, maxys%) ! square is uncovered map dim flag%(maxxs%, maxys%) ! square is flagged map ! Contruct table to calculate adjacent squares dim xoff%(8) ! x offset table dim yoff%(8) ! y offset table xoff%(1) = 0: yoff%(1) = -1 ! up xoff%(2) = +1: yoff%(2) = -1 ! upper right xoff%(3) = +1: yoff%(3) = 0 ! right xoff%(4) = +1: yoff%(4) = +1 ! lower right xoff%(5) = 0: yoff%(5) = +1 ! down xoff%(6) = -1: yoff%(6) = +1 ! lower left xoff%(7) = -1: yoff%(7) = 0 ! left xoff%(8) = -1: yoff%(8) = -1 ! upper left ! declares, not required but nice dim x%, y% ! user move coordinates dim done% ! game over dim centerx% ! center of screen position x dim centery% ! center of screen position y dim cursorx% ! cursor location x dim cursory% ! cursor location y dim badguess% ! bad guess display flag dim mousex% ! mouse position x dim mousey% ! mouse position y !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! ! Find adjacent mines ! ! Finds the number of mines adjacent to a given square. ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! function adjacent%(x%, y%) dim mines% ! number of mines dim xn%, yn% ! neighbor coordinates } dim i% ! index for move array } mines% = 0 ! clear mine count for i% = 1 to 8 ! process points of the compass xn% = x%+xoff%(i%) ! find neighbor locations yn% = y%+yoff%(i%) if xn% >= 1 and xn% <= maxxs% and yn% >= 1 and yn% <= maxys% then ! valid location if mine%(xn%, yn%) then mines% = mines%+1 ! count mines endif next i% endfunc mines% ! return the number of mines !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! ! Set adjacent squares visable ! ! Sets all of the valid adjacent squares visable. If any of those squares are ! not adjacent to a mine, then the neighbors of that square are set visable, etc. ! (recursively). ! This is done to "rip" grids of obviously empty neighbors off the board. ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! procedure visadj(x%, y%) dim xn%, yn% ! neighbor coordinates dim i% ! index for move array for i% = 1 to 8 ! process points of the compass xn% = x%+xoff%(i%) ! find neighbor locations yn% = y%+yoff%(i%) if xn% >= 1 and xn% <= maxxs% and yn% >= 1 and yn% <= maxys% then if not vis%(xn%, yn%) then ! not already visable ! valid location vis%(xn%, yn%) = true% ! set visable if adjacent%(xn%, yn%) = 0 then visadj(xn%, yn%) ! perform recursively endif endif next i% endproc !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! ! Display board ! ! Displays the playing board. ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! procedure display dim x% dim y% dim cnt% ! count of adjacent mines ! scan screen bcolor(yellow%) ! set background color for y% = 1 to maxys% for x% = 1 to maxxs% cursor(centerx%+x%-1, centery%+y%-1) ! set start of next line if vis%(x%, y%) then if mine%(x%, y%) then print "*"; else cnt% = adjacent%(x%, y%) ! find adjacent mine count if cnt% = 0 then print "." ! no adjacent else print chr$(cnt%+asc("0")); ! place the number endif endif else if flag%(x%, y%) then ! display flagged location if badguess% then print "X"; else print "M"; else print "="; endif next x% next y% print endproc !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! ! Initalize board ! ! Clears all board squares to no mines, invisible and not flagged. ! Then, the specified number of mines are layed on the board at random. ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! procedure clrbrd dim x% dim y% dim n% for x% = 1 to maxxs% ! clear minefield for y% = 1 to maxys% mine%(x%, y%) = false ! set no mine vis%(x%, y%) = false ! set not visible flag%(x%, y%) = false ! set not flagged next y% next x% for n% = 1 to maxmine ! place mine repeat x% = rnd(0)*maxxs% y% = rnd(0)*maxys% until not mine%(x%, y%) ! no mine exists at square mine%(x%, y%) = true ! place mine next n% endproc !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! ! Clear line ! ! Clears the specified line to spaces in the specified color. ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! procedure clrlin(y%, clr%) dim i% cursor(1, y%) ! position to specified line bcolor(clr%) ! set color for i% = 1 to maxx% do print " "; ! clear line endproc !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! ! Print centered string ! ! Prints the given string centered on the given line. ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! procedure prtmid(y%, s$) cursor(maxx% div 2-len(s$) div 2, y%) ! position to start print s$; ! output the string endproc !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! ! Draw character box ! ! Draws a box of the given color and character to the location. ! The colors are not saved or restored. ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! procedure tbox(sx%, sy%, ex%, ey%, c$, bclr%, fclr%) dim x%, y% ! coordinates bcolor(bclr%) fcolor(fclr%) cursor(sx%, sy%) ! position at box top left for x% = sx% to ex%: print c$;: next x% ! draw box top cursor(sx%, ey%) ! position at box lower left for x% = sx% to ex%: print c$;: next x% ! draw box bottom for y% = sy%+1 to ey%-1 ! draw box left side cursor(sx%, y%) ! place cursor print c$; ! place character next y% for y% = sy%+1 to ey%-1 ! draw box left side cursor(ex%, y%) ! place cursor print c$; ! place character next y% endproc !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! ! Check coordinates on board ! ! Checks if the given x, y coordinates are in the valid playing area.. ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! function insquare%(x%, y%) dim inx% ! inside x dim iny% ! inside y inx% = mousex% >= centerx% and mousex% <= centerx%+maxxs%-1 ! find x iny% = mousey% >= centery% and mousey% <= centery%+maxys%-1 ! find y endfunc inx% and iny% !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! ! Check replay ! ! Asks the user if a replay is desired, then either cancels the game, or ! sets up a new game as requested. ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! procedure replay ! ask user for replay bcolor(cyan%) prtmid(maxy%, "PLAY AGAIN (Y/N) ?") repeat ! wait for response ! wait till a character is pressed repeat event(nextevent) until nextevent.etype = etchar% or nextevent.etype = etterm% if nextevent.etype = etterm% then done% = true% ! force a quit until lcase(nextevent.char$) = "y" or lcase(nextevent.char) = "n" or done% if lcase(nextevent.char$) = "n" or done% then done% = true% else ! clear old messages clrlin(maxy%-2, cyan%) clrlin(maxy%, cyan%) ! start new game clrbrd ! set up board cursorx% = centerx% ! set inital cursor position cursory% = centery% badguess% = false% ! set bad guesses invisible endif endproc !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! ! Process square "hit" ! ! Processes a "hit" on a square, which means revealing that square, and possibly ! triggering a mine. ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! procedure hit(x%, y%) dim xi%, yi% ! indexes for board dim viscnt% ! visable squares count vis%(x%, y%) = true% ! set that location visable if mine%(x%, y%) then ! mine found ! make all mines visable, and bad guesses too. for yi% = 1 to maxys% for xi = 1 to maxxs% if mine%(xi%, yi%) then vis%(xi%, yi%) = true% next xi% next yi% badguess% = true% ! set bad guesses visable display ! redisplay board ! announce that to the player bcolor(red%) prtmid(maxy%-2, "*** YOU HIT A MINE ! ***") replay ! process replay else ! valid hit if adjacent%(x%, y%) = 0 then visadj(x%, y%) ! clean up adjacent spaces ! now, the player may have won. we find this out by counting all of the ! visable squares, and seeing if the number of squares left is equal ! to the number of mines viscnt% = 0 for yi% = 1 to maxys% for xi% = 1 to maxxs% if vis%(xi%, yi%) then viscnt% = viscnt%+1 ! count visible next xi% next yi% if maxxs%*maxys%-viscnt% = maxmine% then ! player wins display ! redisplay board ! announce that to the player bcolor(red%) prtmid(maxy%-2, "*** YOU WIN ! ***") replay ! process replay endif endif display ! redisplay board endproc !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! ! Main process ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! auto(false%) ! turn off scrolling bcolor(cyan%) ! color the background clear ! clear to that bcolor(magenta%) prtmid(1, "******* Mine game 1.0 ********") ! output title ! find center board position centerx% = maxx% div 2-maxxs% div 2 centery% = maxy% div 2-maxys% div 2 ! draw a border around that tbox(centerx%-1, centery%-1, centerx%+maxxs%, centery%+maxys%, " ", blue%, black%) bcolor(white%) ! restore the background clrbrd ! set up board display ! display board } done% = false% ! set game in progress cursorx% = centerx% ! set inital cursor position cursory% = centery% badguess% = false% ! set bad guesses invisible repeat ! enter user moves cursor(cursorx%, cursory%) ! place cursor x% = cursorx%-centerx%+1 ! set location on board y% = cursory-centery+1 event(nextevent) ! get the next event select nextevent.etype% ! event case ettab% ! process flag ! reverse flagging on location flag(x%, y%) = not flag(x%, y%) display ! redisplay board case etenter%: hit(x%, y%) ! process hit ! move up case etup%: if cursory% > centery% then cursory% = cursory%-1 ! move left case etleft%: if cursorx% > centerx% then cursorx% = cursorx%-1 ! move down case etdown%: if cursory% < centery%+maxys%-1 then cursory% = cursory%+1 ! move right case etright%: if cursorx% < centerx%+maxxs%-1 then cursorx% = cursorx%+1 case etmoumov% ! mouse movement mousex% = nextevent.moupx% ! set new mouse position mousey% = nextevent.moupy% case etmouba ! mouse button 1, hit if nextevent.amoubn% = 1 and onboard%(mousex%, mousey%) then ! mouse postion inside valid square cursorx% = mousex% ! set current position to that cursory% = mousey% x% = cursorx%-centerx%+1 ! set location on board y% = cursory%-centery%+1 hit(x%, y%) ! process hit else if nextevent.amoubn% = 2 and onboard%(mousex%, mousey%) then ! mouse postion inside valid square cursorx% = mousex% ! set current position to that cursory% = mousey% x% = cursorx%-centerx%+1 ! set location on board y% = cursory%-centery%+1 ! reverse flagging on location flag(x%, y%) = flag(x%, y%) display ! redisplay board endif endsel until done% or nextevent.etype% = etterm% ! game complete auto(true%) ! turn off scrolling bcolor(white%) ! restore colors fcolor(black%) clear ! clear screen end 1 PRINT TAB(33);"MUGWUMP" 2 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 3 PRINT:PRINT:PRINT 4 REM COURTESY PEOPLE'S COMPUTER COMPANY 10 DIM P(4,2) 20 PRINT "THE OBJECT OF THIS GAME IS TO FIND FOUR MUGWUMPS" 30 PRINT "HIDDEN ON A 10 BY 10 GRID. HOMEBASE IS POSITION 0,0." 40 PRINT "ANY GUESS YOU MAKE MUST BE TWO NUMBERS WITH EACH" 50 PRINT "NUMBER BETWEEN 0 AND 9, INCLUSIVE. FIRST NUMBER" 60 PRINT "IS DISTANCE TO RIGHT OF HOMEBASE AND SECOND NUMBER" 70 PRINT "IS DISTANCE ABOVE HOMEBASE." 80 PRINT 90 PRINT "YOU GET 10 TRIES. AFTER EACH TRY, I WILL TELL" 100 PRINT "YOU HOW FAR YOU ARE FROM EACH MUGWUMP." 110 PRINT 240 GOSUB 1000 250 T=0 260 T=T+1 270 PRINT 275 PRINT 290 PRINT "TURN NO.";T;"-- WHAT IS YOUR GUESS"; 300 INPUT M,N 310 FOR I=1 TO 4 320 IF P(I,1)=-1 THEN 400 330 IF P(I,1)<>M THEN 380 340 IF P(I,2)<>N THEN 380 350 P(I,1)=-1 360 PRINT "YOU HAVE FOUND MUGWUMP";I 370 GOTO 400 380 D=SQR((P(I,1)-M)^2+(P(I,2)-N)^2) 390 PRINT "YOU ARE";(INT(D*10))/10;"UNITS FROM MUGWUMP";I 400 NEXT I 410 FOR J=1 TO 4 420 IF P(J,1)<>-1 THEN 470 430 NEXT J 440 PRINT 450 PRINT "YOU GOT THEM ALL IN";T;"TURNS!" 460 GOTO 580 470 IF T<10 THEN 260 480 PRINT 490 PRINT "SORRY, THAT'S 10 TRIES. HERE IS WHERE THEY'RE HIDING:" 540 FOR I=1 TO 4 550 IF P(I,1)=-1 THEN 570 560 PRINT "MUGWUMP";I;"IS AT (";P(I,1);",";P(I,2);")" 570 NEXT I 580 PRINT 600 PRINT "THAT WAS FUN! LET'S PLAY AGAIN......." 610 PRINT "FOUR MORE MUGWUMPS ARE NOW IN HIDING." 630 GOTO 240 1000 FOR J=1 TO 2 1010 FOR I=1 TO 4 1020 P(I,J)=INT(10*RND(1)) 1030 NEXT I 1040 NEXT J 1050 RETURN 1099 END 1 PRINT TAB(34);"NAME" 2 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 3 PRINT: PRINT: PRINT 5 DIM B$(40) 10 PRINT "HELLO.": PRINT "MY NAME IS CREATIVE COMPUTER." 20 PRINT "WHAT'S YOUR NAME (FIRST AND LAST";: INPUT A$: L=LEN(A$) 30 PRINT: PRINT "THANK YOU, "; 40 FOR I=1 TO L: B$(I)=MID$(A$,I,1): NEXT I 50 FOR I=L TO 1 STEP -1: PRINT B$(I);: NEXT I 60 PRINT ".": PRINT "OOPS! I GUESS I GOT IT BACKWARDS. A SMART" 70 PRINT "COMPUTER LIKE ME SHOULDN'T MAKE A MISTAKE LIKE THAT!": PRINT 80 PRINT "BUT I JUST NOTICED YOUR LETTERS ARE OUT OF ORDER." 90 PRINT "LET'S PUT THEM IN ORDER LIKE THIS: "; 100 FOR J=2 TO L: I=J-1: T$=B$(J) 110 IF T$>B$(I) THEN 130 120 B$(I+1)=B$(I): I=I-1: IF I>0 THEN 110 130 B$(I+1)=T$: NEXT J 140 FOR I=1 TO L: PRINT B$(I);: NEXT I: PRINT: PRINT 150 PRINT "DON'T YOU LIKE THAT BETTER";: INPUT D$ 160 IF D$="YES" THEN 180 170 PRINT: PRINT "I'M SORRY YOU DON'T LIKE IT THAT WAY.": GOTO 200 180 PRINT: PRINT "I KNEW YOU'D AGREE!!" 200 PRINT: PRINT "I REALLY ENJOYED MEETING YOU ";A$;"." 210 PRINT "HAVE A NICE DAY!" 999 END 2 PRINT TAB(33);"NICOMA" 4 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 6 PRINT: PRINT: PRINT 10 PRINT "BOOMERANG PUZZLE FROM ARITHMETICA OF NICOMACHUS -- A.D. 90!" 20 PRINT 30 PRINT "PLEASE THINK OF A NUMBER BETWEEN 1 AND 100." 40 PRINT "YOUR NUMBER DIVIDED BY 3 HAS A REMAINDER OF"; 45 INPUT A 50 PRINT "YOUR NUMBER DIVIDED BY 5 HAS A REMAINDER OF"; 55 INPUT B 60 PRINT "YOUR NUMBER DIVIDED BY 7 HAS A REMAINDER OF"; 65 INPUT C 70 PRINT 80 PRINT "LET ME THINK A MOMENT..." 85 PRINT 90 FOR I=1 TO 1500: NEXT I 100 D=70*A+21*B+15*C 110 IF D<=105 THEN 140 120 D=D-105 130 GOTO 110 140 PRINT "YOUR NUMBER WAS";D;", RIGHT"; 160 INPUT A$ 165 PRINT 170 IF A$="YES" THEN 220 180 IF A$="NO" THEN 240 190 PRINT "EH? I DON'T UNDERSTAND '";A$;"' TRY 'YES' OR 'NO'." 200 GOTO 160 220 PRINT "HOW ABOUT THAT!!" 230 GOTO 250 240 PRINT "I FEEL YOUR ARITHMETIC IS IN ERROR." 250 PRINT 260 PRINT "LET'S TRY ANOTHER." 270 GOTO 20 999 END 100 PRINT TAB(33);"NIM" 110 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 120 PRINT:PRINT:PRINT 210 DIM A(100),B(100,10),D(2) 220 PRINT "THIS IS THE GAME OF NIM." 230 PRINT "DO YOU WANT INSTRUCTIONS"; 240 INPUT Z$ 250 IF Z$="NO" THEN 440 260 IF Z$="no" THEN 440 270 IF Z$="YES" THEN 310 280 IF Z$="yes" THEN 310 290 PRINT "PLEASE ANSWER YES OR NO" 300 GOTO 240 310 PRINT "THE GAME IS PLAYED WITH A NUMBER OF PILES OF OBJECTS." 320 PRINT "ANY NUMBER OF OBJECTS ARE REMOVED FROM ONE PILE BY YOU AND" 330 PRINT "THE MACHINE ALTERNATELY. ON YOUR TURN, YOU MAY TAKE" 340 PRINT "ALL THE OBJECTS THAT REMAIN IN ANY PILE, BUT YOU MUST" 350 PRINT "TAKE AT LEAST ONE OBJECT, AND YOU MAY TAKE OBJECTS FROM" 360 PRINT "ONLY ONE PILE ON A SINGLE TURN. YOU MUST SPECIFY WHETHER" 370 PRINT "WINNING IS DEFINED AS TAKING OR NOT TAKING THE LAST OBJECT," 380 PRINT "THE NUMBER OF PILES IN THE GAME, AND HOW MANY OBJECTS ARE" 390 PRINT "ORIGINALLY IN EACH PILE. EACH PILE MAY CONTAIN A" 400 PRINT "DIFFERENT NUMBER OF OBJECTS." 410 PRINT "THE MACHINE WILL SHOW ITS MOVE BY LISTING EACH PILE AND THE" 420 PRINT "NUMBER OF OBJECTS REMAINING IN THE PILES AFTER EACH OF ITS" 430 PRINT "MOVES." 440 PRINT 450 PRINT "ENTER WIN OPTION - 1 TO TAKE LAST, 2 TO AVOID LAST"; 460 INPUT W 470 IF W=1 THEN 490 480 IF W<>2 THEN 450 490 PRINT "ENTER NUMBER OF PILES"; 500 INPUT N 510 IF N>100 THEN 490 520 IF N<1 THEN 490 530 IF N<>INT(N) THEN 490 540 PRINT "ENTER PILE SIZES" 550 FOR I=1 TO N 560 PRINT I; 570 INPUT A(I) 580 IF A(I)>2000 THEN 560 590 IF A(I)<1 THEN 560 600 IF A(I)<>INT(A(I)) THEN 560 610 NEXT I 620 PRINT "DO YOU WANT TO MOVE FIRST"; 630 INPUT Q9$ 640 IF Q9$="YES" THEN 1450 650 IF Q9$="yes" THEN 1450 660 IF Q9$="NO" THEN 700 670 IF Q9$="no" THEN 700 680 PRINT "PLEASE ANSWER YES OR NO." 690 GOTO 630 700 IF W=1 THEN 940 710 LET C=0 720 FOR I=1 TO N 730 IF A(I)=0 THEN 770 740 LET C=C+1 750 IF C=3 THEN 840 760 LET D(C)=I 770 NEXT I 780 IF C=2 THEN 920 790 IF A(D(1))>1 THEN 820 800 PRINT "MACHINE LOSES" 810 GOTO 1640 820 PRINT "MACHINE WINS" 830 GOTO 1640 840 LET C=0 850 FOR I=1 TO N 860 IF A(I)>1 THEN 940 870 IF A(I)=0 THEN 890 880 LET C=C+1 890 NEXT I 900 IF C/2<>INT(C/2) THEN 800 910 GOTO 940 920 IF A(D(1))=1 THEN 820 930 IF A(D(2))=1 THEN 820 940 FOR I=1 TO N 950 LET E=A(I) 960 FOR J=0 TO 10 970 LET F=E/2 980 LET B(I,J)=2*(F-INT(F)) 990 LET E=INT(F) 1000 NEXT J 1010 NEXT I 1020 FOR J=10 TO 0 STEP -1 1030 LET C=0 1040 LET H=0 1050 FOR I=1 TO N 1060 IF B(I,J)=0 THEN 1110 1070 LET C=C+1 1080 IF A(I)<=H THEN 1110 1090 LET H=A(I) 1100 LET G=I 1110 NEXT I 1120 IF C/2<>INT(C/2) THEN 1190 1130 NEXT J 1140 LET E=INT(N*RND(1)+1) 1150 IF A(E)=0 THEN 1140 1160 LET F=INT(A(E)*RND(1)+1) 1170 LET A(E)=A(E)-F 1180 GOTO 1380 1190 LET A(G)=0 1200 FOR J=0 TO 10 1210 LET B(G,J)=0 1220 LET C=0 1230 FOR I=1 TO N 1240 IF B(I,J)=0 THEN 1260 1250 LET C=C+1 1260 NEXT I 1270 LET A(G)=A(G)+2*(C/2-INT(C/2))*2^J 1280 NEXT J 1290 IF W=1 THEN 1380 1300 LET C=0 1310 FOR I=1 TO N 1320 IF A(I)>1 THEN 1380 1330 IF A(I)=0 THEN 1350 1340 LET C=C+1 1350 NEXT I 1360 IF C/2<>INT(C/2) THEN 1380 1370 LET A(G)=1-A(G) 1380 PRINT "PILE SIZE" 1390 FOR I=1 TO N 1400 PRINT I;A(I) 1410 NEXT I 1420 IF W=2 THEN 1450 1430 GOSUB 1570 1440 IF Z=1 THEN 820 1450 PRINT "YOUR MOVE - PILE, NUMBER TO BE REMOVED"; 1460 INPUT X,Y 1470 IF X>N THEN 1450 1480 IF X<1 THEN 1450 1490 IF X<>INT(X) THEN 1450 1500 IF Y>A(X) THEN 1450 1510 IF Y<1 THEN 1450 1520 IF Y<>INT(Y) THEN 1450 1530 LET A(X)=A(X)-Y 1540 GOSUB 1570 1550 IF Z=1 THEN 800 1560 GOTO 700 1570 LET Z=0 1580 FOR I=1 TO N 1590 IF A(I)=0 THEN 1610 1600 RETURN 1610 NEXT I 1620 LET Z=1 1630 RETURN 1640 PRINT "do you want to play another game"; 1650 INPUT Q9$ 1660 IF Q9$="YES" THEN 1720 1670 IF Q9$="yes" THEN 1720 1680 IF Q9$="NO" THEN 1730 1690 IF Q9$="no" THEN 1730 1700 PRINT "PLEASE. YES OR NO." 1710 GOTO 1650 1720 GOTO 440 1730 END 1 PRINT TAB(33);"NUMBER" 2 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 3 PRINT:PRINT:PRINT 4 PRINT "YOU HAVE 100 POINTS. BY GUESSING NUMBERS FROM 1 TO 5, YOU" 5 PRINT "CAN GAIN OR LOSE POINTS DEPENDING UPON HOW CLOSE YOU GET TO" 6 PRINT "A RANDOM NUMBER SELECTED BY THE COMPUTER.": PRINT 7 PRINT "YOU OCCASIONALLY WILL GET A JACKPOT WHICH WILL DOUBLE(!)" 8 PRINT "YOUR POINT COUNT. YOU WIN WHEN YOU GET 500 POINTS." 9 PRINT: P=100 10 DEF FNR(X)=INT(5*RND(1)+1) 12 INPUT "GUESS A NUMBER FROM 1 TO 5";G 15 R=FNR(1) 16 S=FNR(1) 17 T=FNR(1) 18 U=FNR(1) 19 V=FNR(1) 20 IF G=R THEN 30 21 IF G=S THEN 40 22 IF G=T THEN 50 23 IF G=U THEN 60 24 IF G=V THEN 70 25 IF G>5 THEN 12 30 P=P-5 35 GOTO 80 40 P=P+5 45 GOTO 80 50 P=P+P 53 PRINT "YOU HIT THE JACKPOT!!!" 55 GOTO 80 60 P=P+1 65 GOTO 80 70 P=P-(P*.5) 80 IF P>500 THEN 90 82 PRINT "YOU HAVE";P;"POINTS.":PRINT 85 GOTO 12 90 PRINT "!!!!YOU WIN!!!! WITH ";P;"POINTS." 99 END 2 PRINT TAB(30);"ONE CHECK" 4 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 6 PRINT: PRINT: PRINT 8 DIM A(64) 10 PRINT "SOLITAIRE CHECKER PUZZLE BY DAVID AHL" 15 PRINT 20 PRINT "48 CHECKERS ARE PLACED ON THE 2 OUTSIDE SPACES OF A" 25 PRINT "STANDARD 64-SQUARE CHECKERBOARD. THE OBJECT IS TO" 30 PRINT "REMOVE AS MANY CHECKERS AS POSSIBLE BY DIAGONAL JUMPS" 35 PRINT "(AS IN STANDARD CHECKERS). USE THE NUMBERED BOARD TO" 40 PRINT "INDICATE THE SQUARE YOU WISH TO JUMP FROM AND TO. ON" 45 PRINT "THE BOARD PRINTED OUT ON EACH TURN '1' INDICATES A" 50 PRINT "CHECKER AND '0' AN EMPTY SQUARE. WHEN YOU HAVE NO" 55 PRINT "POSSIBLE JUMPS REMAINING, INPUT A '0' IN RESPONSE TO" 60 PRINT "QUESTION 'JUMP FROM ?'" 62 PRINT 63 PRINT "HERE IS THE NUMERICAL BOARD:" 66 PRINT 70 FOR J=1 TO 57 STEP 8 74 PRINT J;TAB(4);J+1;TAB(8);J+2;TAB(12);J+3;TAB(16);J+4;TAB(20);J+5; 75 PRINT TAB(24);J+6;TAB(28);J+7 76 NEXT J 77 PRINT 78 PRINT "AND HERE IS THE OPENING POSITION OF THE CHECKERS." 79 PRINT 80 FOR J=1 TO 64 82 A(J)=1 84 NEXT J 86 FOR J=19 TO 43 STEP 8 88 FOR I=J TO J+3 90 A(I)=0 92 NEXT I 94 NEXT J 96 M=0 98 GOTO 340 100 INPUT "JUMP FROM";F 105 IF F=0 THEN 500 110 INPUT "TO";T 112 PRINT 118 REM *** CHECK LEGALITY OF MOVE 120 F1=INT((F-1)/8) 130 F2=F-8*F1 140 T1=INT((T-1)/8) 150 T2=T-8*T1 160 IF F1>7 THEN 230 170 IF T1>7 THEN 230 180 IF F2>8 THEN 230 190 IF T2>8 THEN 230 200 IF ABS(F1-T1)<>2 THEN 230 210 IF ABS(F2-T2)<>2 THEN 230 212 IF A((T+F)/2)=0 THEN 230 215 IF A(F)=0 THEN 230 220 IF A(T)=1 THEN 230 225 GOTO 250 230 PRINT "ILLEGAL MOVE. TRY AGAIN..." 240 GOTO 100 245 REM *** UPDATE BOARD 250 A(T)=1 260 A(F)=0 270 A((T+F)/2)=0 290 M=M+1 310 REM *** PRINT BOARD 340 FOR J=1 TO 57 STEP 8 350 FOR I=J TO J+7 360 PRINT A(I); 370 NEXT I 380 PRINT 390 NEXT J 400 PRINT 410 GOTO 100 490 REM *** END GAME SUMMARY 500 S=0 510 FOR I=1 TO 64 520 S=S+A(I) 530 NEXT I 540 PRINT:PRINT "YOU MADE";M;"JUMPS AND HAD";S;"PIECES" 550 PRINT "REMAINING ON THE BOARD." 560 PRINT 562 INPUT "TRY AGAIN";A$ 570 IF A$="YES" THEN 70 575 IF A$="NO" THEN 600 580 PRINT "PLEASE ANSWER 'YES' OR 'NO'." 590 GOTO 562 600 PRINT 610 PRINT "O.K. HOPE YOU HAD FUN!!" 999 END 2 PRINT TAB(33);"ORBIT" 4 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 6 PRINT:PRINT:PRINT 10 PRINT "SOMEWHERE ABOVE YOUR PLANET IS A ROMULAN SHIP." 15 PRINT 20 PRINT "THE SHIP IS IN A CONSTANT POLAR ORBIT. ITS" 25 PRINT "DISTANCE FROM THE CENTER OF YOUR PLANET IS FROM" 30 PRINT "10,000 TO 30,000 MILES AND AT ITS PRESENT VELOCITY CAN" 31 PRINT "CIRCLE YOUR PLANET ONCE EVERY 12 TO 36 HOURS." 35 PRINT 40 PRINT "UNFORTUNATELY, THEY ARE USING A CLOAKING DEVICE SO" 45 PRINT "YOU ARE UNABLE TO SEE THEM, BUT WITH A SPECIAL" 50 PRINT "INSTRUMENT YOU CAN TELL HOW NEAR THEIR SHIP YOUR" 55 PRINT "PHOTON BOMB EXPLODED. YOU HAVE SEVEN HOURS UNTIL THEY" 60 PRINT "HAVE BUILT UP SUFFICIENT POWER IN ORDER TO ESCAPE" 65 PRINT "YOUR PLANET'S GRAVITY." 70 PRINT 75 PRINT "YOUR PLANET HAS ENOUGH POWER TO FIRE ONE BOMB AN HOUR." 80 PRINT 85 PRINT "AT THE BEGINNING OF EACH HOUR YOU WILL BE ASKED TO GIVE AN" 90 PRINT "ANGLE (BETWEEN 0 AND 360) AND A DISTANCE IN UNITS OF" 95 PRINT "100 MILES (BETWEEN 100 AND 300), AFTER WHICH YOUR BOMB'S" 100 PRINT "DISTANCE FROM THE ENEMY SHIP WILL BE GIVEN." 105 PRINT 110 PRINT "AN EXPLOSION WITHIN 5,000 MILES OF THE ROMULAN SHIP" 111 PRINT "WILL DESTROY IT." 114 PRINT 115 PRINT "BELOW IS A DIAGRAM TO HELP YOU VISUALIZE YOUR PLIGHT." 116 PRINT 117 PRINT 168 PRINT " 90" 170 PRINT " 0000000000000" 171 PRINT " 0000000000000000000" 172 PRINT " 000000 000000" 173 PRINT " 00000 00000" 174 PRINT " 00000 XXXXXXXXXXX 00000" 175 PRINT " 00000 XXXXXXXXXXXXX 00000" 176 PRINT " 0000 XXXXXXXXXXXXXXX 0000" 177 PRINT " 0000 XXXXXXXXXXXXXXXXX 0000" 178 PRINT " 0000 XXXXXXXXXXXXXXXXXXX 0000" 179 PRINT "180<== 00000 XXXXXXXXXXXXXXXXXXX 00000 ==>0" 180 PRINT " 0000 XXXXXXXXXXXXXXXXXXX 0000" 181 PRINT " 0000 XXXXXXXXXXXXXXXXX 0000" 182 PRINT " 0000 XXXXXXXXXXXXXXX 0000" 183 PRINT " 00000 XXXXXXXXXXXXX 00000" 184 PRINT " 00000 XXXXXXXXXXX 00000" 185 PRINT " 00000 00000" 186 PRINT " 000000 000000" 187 PRINT " 0000000000000000000" 188 PRINT " 0000000000000" 190 PRINT " 270" 192 PRINT 195 PRINT "X - YOUR PLANET" 196 PRINT "O - THE ORBIT OF THE ROMULAN SHIP" 197 PRINT 198 PRINT "ON THE ABOVE DIAGRAM, THE ROMULAN SHIP IS CIRCLING" 199 PRINT "COUNTERCLOCKWISE AROUND YOUR PLANET. DON'T FORGET THAT" 200 PRINT "WITHOUT SUFFICIENT POWER THE ROMULAN SHIP'S ALTITUDE" 210 PRINT "AND ORBITAL RATE WILL REMAIN CONSTANT." 220 PRINT 230 PRINT "GOOD LUCK. THE FEDERATION IS COUNTING ON YOU." 270 A=INT(360*RND(1)) 280 D=INT(200*RND(1)+200) 290 R=INT(20*RND(1)+10) 300 H=0 310 IF H=7 THEN 490 320 H=H+1 325 PRINT 326 PRINT 330 PRINT "THIS IS HOUR";H;", AT WHAT ANGLE DO YOU WISH TO SEND" 335 PRINT "YOUR PHOTON BOMB"; 340 INPUT A1 350 PRINT "HOW FAR OUT DO YOU WISH TO DETONATE IT"; 360 INPUT D1 365 PRINT 366 PRINT 370 A=A+R 380 IF A<360 THEN 400 390 A=A-360 400 T=ABS(A-A1) 410 IF T<180 THEN 430 420 T=360-T 430 C=SQR(D*D+D1*D1-2*D*D1*COS(T*3.14159/180)) 440 PRINT "YOUR PHOTON BOMB EXPLODED";C;"*10^2 MILES FROM THE" 445 PRINT "ROMULAN SHIP." 450 IF C<=50 THEN 470 460 GOTO 310 470 PRINT "YOU HAVE SUCCESFULLY COMPLETED YOUR MISSION." 480 GOTO 500 490 PRINT "YOU HAVE ALLOWED THE ROMULANS TO ESCAPE." 500 PRINT "ANOTHER ROMULAN SHIP HAS GONE INTO ORBIT." 510 PRINT "DO YOU WISH TO TRY TO DESTROY IT"; 520 INPUT C$ 530 IF C$="YES" THEN 270 540 PRINT "GOOD BYE." 999 END 5 PRINT TAB(33);"PIZZA" 10 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 15 PRINT: PRINT: PRINT 20 DIM S$(16),M$(4) 30 PRINT "PIZZA DELIVERY GAME": PRINT 50 INPUT "WHAT IS YOUR FIRST NAME";N$: PRINT 80 PRINT "HI, ";N$;". IN THIS GAME YOU ARE TO TAKE ORDERS" 90 PRINT "FOR PIZZAS. THEN YOU ARE TO TELL A DELIVERY BOY" 100 PRINT "WHERE TO DELIVER THE ORDERED PIZZAS.": PRINT: PRINT 140 FOR I=1 TO 16 150 READ S$(I) 160 NEXT I 170 FOR I=1 TO 4 180 READ M$(I) 190 NEXT I 200 DATA "A","B","C","D","E","F","G","H","I","J","K","L","M","N","O" 210 DATA "P","1","2","3","4" 230 PRINT "MAP OF THE CITY OF HYATTSVILLE": PRINT 250 PRINT " -----1-----2-----3-----4-----" 260 K=4 270 FOR I=1 TO 4 280 PRINT "-": PRINT "-": PRINT"-": PRINT "-" 320 PRINT M$(K); 330 S1=16-4*I+1 340 PRINT " ";S$(S1);" ";S$(S1+1);" ";S$(S1+2);" "; 350 PRINT S$(S1+3);" ";M$(K) 380 K=K-1 390 NEXT I 400 PRINT "-": PRINT "-": PRINT "-": PRINT "-" 440 PRINT " -----1-----2-----3-----4-----": PRINT 460 PRINT "THE OUTPUT IS A MAP OF THE HOMES WHERE" 470 PRINT "YOU ARE TO SEND PIZZAS.": PRINT 490 PRINT "YOUR JOB IS TO GIVE A TRUCK DRIVER" 500 PRINT "THE LOCATION OR COORDINATES OF THE" 510 PRINT "HOME ORDERING THE PIZZA.": PRINT 520 INPUT "DO YOU NEED MORE DIRECTIONS";A$ 530 IF A$="YES" THEN 590 540 IF A$="NO" THEN 750 550 PRINT "'YES' OR 'NO' PLEASE, NOW THEN,": GOTO 520 590 PRINT: PRINT "SOMEBODY WILL ASK FOR A PIZZA TO BE" 600 PRINT "DELIVERED. THEN A DELIVERY BOY WILL" 610 PRINT "ASK YOU FOR THE LOCATION.":PRINT " EXAMPLE:" 620 PRINT "THIS IS J. PLEASE SEND A PIZZA." 640 PRINT "DRIVER TO ";N$;". WHERE DOES J LIVE?" 650 PRINT "YOUR ANSWER WOULD BE 2,3": PRINT 660 INPUT "UNDERSTAND";A$ 670 IF A$="YES" THEN 690 680 PRINT "THIS JOB IS DEFINITELY TOO DIFFICULT FOR YOU. THANKS ANYWAY" 685 GOTO 999 690 PRINT "GOOD. YOU ARE NOW READY TO START TAKING ORDERS.": PRINT 700 PRINT "GOOD LUCK!!": PRINT 750 FOR I=1 TO 5 760 S=INT(RND(1)*16+1): PRINT 770 PRINT "HELLO ";N$;"'S PIZZA. THIS IS ";S$(S);"."; 775 PRINT " PLEASE SEND A PIZZA." 780 PRINT " DRIVER TO ";N$;": WHERE DOES ";S$(S);" LIVE"; 790 INPUT A(1),A(2) 870 T=A(1)+(A(2)-1)*4 880 IF T=S THEN 920 890 PRINT "THIS IS ";S$(T);". I DID NOT ORDER A PIZZA." 900 PRINT "I LIVE AT ";A(1);",";A(2) 910 GOTO 780 920 PRINT "HELLO "N$;". THIS IS ";S$(S);", THANKS FOR THE PIZZA." 930 NEXT I 940 PRINT: INPUT "DO YOU WANT TO DELIVER MORE PIZZAS";A$ 960 IF A$="YES" THEN 750 970 PRINT: PRINT "O.K. ";N$;", SEE YOU LATER!":PRINT 999 END 10 PRINT TAB(30);"POETRY" 20 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 30 PRINT:PRINT:PRINT 90 ON I GOTO 100,101,102,103,104 100 PRINT "MIDNIGHT DREARY";:GOTO 210 101 PRINT "FIERY EYES";:GOTO 210 102 PRINT "BIRD OR FIEND";:GOTO 210 103 PRINT "THING OF EVIL";:GOTO 210 104 PRINT "PROPHET";:GOTO 210 110 ON I GOTO 111,112,113,114,115 111 PRINT "BEGUILING ME";:U=2:GOTO 210 112 PRINT "THRILLED ME";:GOTO 210 113 PRINT "STILL SITTING....";:GOTO 212 114 PRINT "NEVER FLITTING";:U=2:GOTO 210 115 PRINT "BURNED";:GOTO 210 120 ON I GOTO 121,122,123,124,125 121 PRINT "AND MY SOUL";:GOTO 210 122 PRINT "DARKNESS THERE";:GOTO 210 123 PRINT "SHALL BE LIFTED";:GOTO 210 124 PRINT "QUOTH THE RAVEN";:GOTO 210 125 IF U=0 THEN 210 126 PRINT "SIGN OF PARTING";:GOTO 210 130 ON I GOTO 131,132,133,134,135 131 PRINT "NOTHING MORE";:GOTO 210 132 PRINT "YET AGAIN";:GOTO 210 133 PRINT "SLOWLY CREEPING";:GOTO 210 134 PRINT "...EVERMORE";:GOTO 210 135 PRINT "NEVERMORE"; 210 IF U=0 OR RND(1)>.19 THEN 212 211 PRINT ",";:U=2 212 IF RND(1)>.65 THEN 214 213 PRINT " ";:U=U+1:GOTO 215 214 PRINT : U=0 215 I=INT(INT(10*RND(1))/2)+1 220 J=J+1 : K=K+1 230 IF U>0 OR INT(J/2)<>J/2 THEN 240 235 PRINT " "; 240 ON J GOTO 90,110,120,130,250 250 J=0 : PRINT : IF K>20 THEN 270 260 GOTO 215 270 PRINT : U=0 : K=0 : GOTO 110 999 END 2 PRINT TAB(33);"POKER" 4 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 6 PRINT: PRINT: PRINT 10 DIM A(50),B(15) 20 DEF FNA(X)=INT(10*RND(1)) 30 DEF FNB(X)=X-100*INT(X/100) 40 PRINT "WELCOME TO THE CASINO. WE EACH HAVE $200." 50 PRINT "I WILL OPEN THE BETTING BEFORE THE DRAW; YOU OPEN AFTER." 60 PRINT "TO FOLD BET 0; TO CHECK BET .5." 70 PRINT "ENOUGH TALK -- LET'S GET DOWN TO BUSINESS." 80 PRINT 90 LET O=1 100 LET C=200 110 LET S=200 120 LET P=0 130 REM 140 PRINT 150 IF C<=5 THEN 3670 160 PRINT "THE ANTE IS $5. I WILL DEAL:" 170 PRINT 180 IF S>5 THEN 200 190 GOSUB 3830 200 LET P=P+10 210 LET S=S-5 220 LET C=C-5 230 FOR Z=1 TO 10 240 GOSUB 1740 250 NEXT Z 260 PRINT "YOUR HAND:" 270 N=1 280 GOSUB 1850 290 N=6 300 I=2 310 GOSUB 2170 320 PRINT 330 IF I<>6 THEN 470 340 IF FNA(0)<=7 THEN 370 350 LET X=11100 360 GOTO 420 370 IF FNA(0)<=7 THEN 400 380 LET X=11110 390 GOTO 420 400 IF FNA(0)>=1 THEN 450 410 X=11111 420 I=7 430 Z=23 440 GOTO 580 450 Z=1 460 GOTO 510 470 IF U>=13 THEN 540 480 IF FNA(0)>=2 THEN 500 490 GOTO 420 500 Z=0 510 K=0 520 PRINT "I CHECK." 530 GOTO 620 540 IF U<=16 THEN 570 550 Z=2 560 IF FNA(0)>=1 THEN 580 570 Z=35 580 V=Z+FNA(0) 590 GOSUB 3480 600 PRINT "I'LL OPEN WITH $"V 610 K=V 620 GOSUB 3050 630 GOSUB 650 640 GOTO 820 650 IF I<>3 THEN 760 660 PRINT 670 PRINT "I WIN." 680 C=C+P 690 PRINT "NOW I HAVE $"C"AND YOU HAVE $"S 700 PRINT "DO YOU WISH TO CONTINUE"; 710 INPUT H$ 720 IF H$="YES" THEN 120 730 IF H$="NO" THEN 4100 740 PRINT "ANSWER YES OR NO, PLEASE." 750 GOTO 700 760 IF I<>4 THEN 810 770 PRINT 780 PRINT "YOU WIN." 790 S=S+P 800 GOTO 690 810 RETURN 820 PRINT 830 PRINT "NOW WE DRAW -- HOW MANY CARDS DO YOU WANT"; 840 INPUT T 850 IF T=0 THEN 980 860 Z=10 870 IF T<4 THEN 900 880 PRINT "YOU CAN'T DRAW MORE THAN THREE CARDS." 890 GOTO 840 900 PRINT "WHAT ARE THEIR NUMBERS:" 910 FOR Q=1 TO T 920 INPUT U 930 GOSUB 1730 940 NEXT Q 950 PRINT "YOUR NEW HAND:" 960 N=1 970 GOSUB 1850 980 Z=10+T 990 FOR U=6 TO 10 1000 IF INT(X/10^(U-6))<>10*INT(X/10^(U-5)) THEN 1020 1010 GOSUB 1730 1020 NEXT U 1030 PRINT 1040 PRINT "I AM TAKING"Z-10-T"CARD"; 1050 IF Z=11+T THEN 1090 1060 PRINT "S" 1070 PRINT 1080 GOTO 1100 1090 PRINT 1100 N=6 1110 V=I 1120 I=1 1130 GOSUB 2170 1140 B=U 1150 M=D 1160 IF V<>7 THEN 1190 1170 Z=28 1180 GOTO 1330 1190 IF I<>6 THEN 1220 1200 Z=1 1210 GOTO 1330 1220 IF U>=13 THEN 1270 1230 Z=2 1240 IF FNA(0)<>6 THEN 1260 1250 Z=19 1260 GOTO 1330 1270 IF U>=16 THEN 1320 1280 Z=19 1290 IF FNA(0)<>8 THEN 1310 1300 Z=11 1310 GOTO 1330 1320 Z=2 1330 K=0 1340 GOSUB 3050 1350 IF T<>.5 THEN 1450 1360 IF V=7 THEN 1400 1370 IF I<>6 THEN 1400 1380 PRINT "I'LL CHECK" 1390 GOTO 1460 1400 V=Z+FNA(0) 1410 GOSUB 3480 1420 PRINT "I'LL BET $"V 1430 K=V 1440 GOSUB 3060 1450 GOSUB 650 1460 PRINT 1470 PRINT "NOW WE COMPARE HANDS:" 1480 J$=H$ 1490 K$=I$ 1500 PRINT "MY HAND:" 1510 N=6 1520 GOSUB 1850 1530 N=1 1540 GOSUB 2170 1550 PRINT 1560 PRINT "YOU HAVE "; 1570 K=D 1580 GOSUB 3690 1590 H$=J$ 1600 I$=K$ 1610 K=M 1620 PRINT "AND I HAVE "; 1630 GOSUB 3690 1640 IF B>U THEN 670 1650 IF U>B THEN 780 1660 IF H$="A FLUS" THEN 1700 1662 IF FNB(M)<FNB(D) THEN 780 1664 IF FNB(M)>FNB(D) THEN 670 1670 PRINT "THE HAND IS DRAWN." 1680 PRINT "ALL $"P"REMAINS IN THE POT." 1690 GOTO 140 1700 IF FNB(M)>FNB(D) THEN 670 1710 IF FNB(D)>FNB(M) THEN 780 1720 GOTO 1670 1730 Z=Z+1 1740 A(Z)=100*INT(4*RND(1))+INT(100*RND(1)) 1750 IF INT(A(Z)/100)>3 THEN 1740 1760 IF A(Z)-100*INT(A(Z)/100)>12 THEN 1740 1765 IF Z=1 THEN 1840 1770 FOR K=1 TO Z-1 1780 IF A(Z)=A(K) THEN 1740 1790 NEXT K 1800 IF Z<=10 THEN 1840 1810 N=A(U) 1820 A(U)=A(Z) 1830 A(Z)=N 1840 RETURN 1850 FOR Z=N TO N+4 1860 PRINT Z"-- "; 1870 GOSUB 1950 1880 PRINT " OF"; 1890 GOSUB 2070 1900 IF Z/2<>INT(Z/2) THEN 1920 1910 PRINT 1920 NEXT Z 1930 PRINT 1940 RETURN 1950 K=FNB(A(Z)) 1960 IF K<>9 THEN 1980 1970 PRINT "JACK"; 1980 IF K<>10 THEN 2000 1990 PRINT "QUEEN"; 2000 IF K<>11 THEN 2020 2010 PRINT "KING"; 2020 IF K<>12 THEN 2040 2030 PRINT "ACE"; 2040 IF K>=9 THEN 2060 2050 PRINT K+2; 2060 RETURN 2070 K=INT(A(Z)/100) 2080 IF K<>0 THEN 2100 2090 PRINT " CLUBS", 2100 IF K<>1 THEN 2120 2110 PRINT " DIAMONDS", 2120 IF K<>2 THEN 2140 2130 PRINT " HEARTS", 2140 IF K<>3 THEN 2160 2150 PRINT " SPADES", 2160 RETURN 2170 U=0 2180 FOR Z=N TO N+4 2190 B(Z)=FNB(A(Z)) 2200 IF Z=N+4 THEN 2230 2210 IF INT(A(Z)/100)<>INT(A(Z+1)/100) THEN 2230 2220 U=U+1 2230 NEXT Z 2240 IF U<>4 THEN 2310 2250 X=11111 2260 D=A(N) 2270 H$="A FLUS" 2280 I$="H IN" 2290 U=15 2300 RETURN 2310 FOR Z=N TO N+3 2320 FOR K=Z+1 TO N+4 2330 IF B(Z)<=B(K) THEN 2390 2340 X=A(Z) 2350 A(Z)=A(K) 2360 B(Z)=B(K) 2370 A(K)=X 2380 B(K)=A(K)-100*INT(A(K)/100) 2390 NEXT K 2400 NEXT Z 2410 X=0 2420 FOR Z=N TO N+3 2430 IF B(Z)<>B(Z+1) THEN 2470 2440 X=X+11*10^(Z-N) 2450 D=A(Z) 2460 GOSUB 2760 2470 NEXT Z 2480 IF X<>0 THEN 2620 2490 IF B(N)+3<>B(N+3) THEN 2520 2500 X=1111 2510 U=10 2520 IF B(N+1)+3<>B(N+4) THEN 2620 2530 IF U<>10 THEN 2600 2540 U=14 2550 H$="STRAIG" 2560 I$="HT" 2570 X=11111 2580 D=A(N+4) 2590 RETURN 2600 U=10 2610 X=11110 2620 IF U>=10 THEN 2690 2630 D=A(N+4) 2640 H$="SCHMAL" 2650 I$="TZ, " 2660 U=9 2670 X=11000 2680 GOTO 2740 2690 IF U<>10 THEN 2720 2700 IF I=1 THEN 2740 2710 GOTO 2750 2720 IF U>12 THEN 2750 2730 IF FNB(D)>6 THEN 2750 2740 I=6 2750 RETURN 2760 IF U>=11 THEN 2810 2770 U=11 2780 H$="A PAIR" 2790 I$=" OF " 2800 RETURN 2810 IF U<>11 THEN 2910 2820 IF B(Z)<>B(Z-1) THEN 2870 2830 H$="THREE" 2840 I$=" " 2850 U=13 2860 RETURN 2870 H$="TWO P" 2880 I$="AIR, " 2890 U=12 2900 RETURN 2910 IF U>12 THEN 2960 2920 U=16 2930 H$="FULL H" 2940 I$="OUSE, " 2950 RETURN 2960 IF B(Z)<>B(Z-1) THEN 3010 2970 U=17 2980 H$="FOUR" 2990 I$=" " 3000 RETURN 3010 U=16 3020 H$="FULL H" 3030 I$="OUSE, " 3040 RETURN 3050 G=0 3060 PRINT:PRINT "WHAT IS YOUR BET"; 3070 INPUT T 3080 IF T-INT(T)=0 THEN 3140 3090 IF K<>0 THEN 3120 3100 IF G<>0 THEN 3120 3110 IF T=.5 THEN 3410 3120 PRINT "NO SMALL CHANGE, PLEASE." 3130 GOTO 3060 3140 IF S-G-T>=0 THEN 3170 3150 GOSUB 3830 3160 GOTO 3060 3170 IF T<>0 THEN 3200 3180 I=3 3190 GOTO 3380 3200 IF G+T>=K THEN 3230 3210 PRINT "IF YOU CAN'T SEE MY BET, THEN FOLD." 3220 GOTO 3060 3230 G=G+T 3240 IF G=K THEN 3380 3250 IF Z<>1 THEN 3420 3260 IF G>5 THEN 3300 3270 IF Z>=2 THEN 3350 3280 V=5 3290 GOTO 3420 3300 IF Z=1 THEN 3320 3310 IF T<=25 THEN 3350 3320 I=4 3330 PRINT "I FOLD." 3340 RETURN 3350 IF Z=2 THEN 3430 3360 PRINT "I'LL SEE YOU." 3370 K=G 3380 S=S-G 3390 C=C-K 3400 P=P+G+K 3410 RETURN 3420 IF G>3*Z THEN 3350 3430 V=G-K+FNA(0) 3440 GOSUB 3480 3450 PRINT "I'LL SEE YOU, AND RAISE YOU"V 3460 K=G+V 3470 GOTO 3060 3480 IF C-G-V>=0 THEN 3660 3490 IF G<>0 THEN 3520 3500 V=C 3510 RETURN 3520 IF C-G>=0 THEN 3360 3530 IF (O/2)<>INT(O/2) THEN 3600 3540 PRINT "WOULD YOU LIKE TO BUY BACK YOUR WATCH FOR $50"; 3550 INPUT J$ 3560 IF LEFT$(J$,1)="N" THEN 3600 3570 C=C+50 3580 O=O/2 3590 RETURN 3600 IF O/3<>INT(O/3) THEN 3670 3610 PRINT "WOULD YOU LIKE TO BUY BACK YOUR TIE TACK FOR $50"; 3620 INPUT J$ 3630 IF LEFT$(J$,1)="N" THEN 3670 3640 C=C+50 3650 O=O/3 3660 RETURN 3670 PRINT "I'M BUSTED. CONGRATULATIONS!" 3680 STOP 3690 PRINT H$;I$; 3700 IF H$<>"A FLUS" THEN 3750 3710 K=INT(K/100) 3720 GOSUB 2080 3730 PRINT 3740 RETURN 3750 K=FNB(K) 3760 GOSUB 1960 3770 IF H$="SCHMAL" THEN 3790 3780 IF H$<>"STRAIG" THEN 3810 3790 PRINT " HIGH" 3800 RETURN 3810 PRINT "'S" 3820 RETURN 3830 PRINT 3840 PRINT "YOU CAN'T BET WITH WHAT YOU HAVEN'T GOT." 3850 IF O/2=INT(O/2) THEN 3970 3860 PRINT "WOULD YOU LIKE TO SELL YOUR WATCH"; 3870 INPUT J$ 3880 IF LEFT$(J$,1)="N" THEN 3970 3890 IF FNA(0)>=7 THEN 3930 3900 PRINT "I'LL GIVE YOU $75 FOR IT." 3910 S=S+75 3920 GOTO 3950 3930 PRINT "THAT'S A PRETTY CRUMMY WATCH - I'LL GIVE YOU $25." 3940 S=S+25 3950 O=O*2 3960 RETURN 3970 IF O/3<>INT(O/3) THEN 4090 3980 PRINT "WILL YOU PART WITH THAT DIAMOND TIE TACK": 3990 INPUT J$ 4000 IF LEFT$(J$,1)="N" THEN 4080 4010 IF FNA(0)>=6 THEN 4050 4020 PRINT "YOU ARE NOW $100 RICHER." 4030 S=S+100 4040 GOTO 4070 4050 PRINT "IT'S PASTE. $25." 4060 S=S+25 4070 O=O*3 4080 RETURN 4090 PRINT "YOUR WAD IS SHOT. SO LONG, SUCKER!" 4100 END 50 PRINT CHR$(26):REM WIDTH 80 100 PRINT TAB(33);"QUBIC":PRINT 110 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 120 PRINT:PRINT:PRINT 210 PRINT "DO YOU WANT INSTRUCTIONS"; 220 INPUT C$ 230 IF LEFT$(C$,1)="N" THEN 315 240 IF LEFT$(C$,1)="Y" THEN 265 250 PRINT "INCORRECT ANSWER. PLEASE TYPE 'YES' OR 'NO'"; 260 GOTO 220 265 PRINT 270 PRINT "THE GAME IS TIC-TAC-TOE IN A 4 X 4 X 4 CUBE." 280 PRINT "EACH MOVE IS INDICATED BY A 3 DIGIT NUMBER, WITH EACH" 290 PRINT "DIGIT BETWEEN 1 AND 4 INCLUSIVE. THE DIGITS INDICATE THE" 300 PRINT "LEVEL, ROW, AND COLUMN, RESPECTIVELY, OF THE OCCUPIED" 305 PRINT "PLACE. " 306 PRINT 307 PRINT "TO PRINT THE PLAYING BOARD, TYPE 0 (ZERO) AS YOUR MOVE." 308 PRINT "THE PROGRAM WILL PRINT THE BOARD WITH YOUR MOVES INDI-" 309 PRINT "CATED WITH A (Y), THE MACHINE'S MOVES WITH AN (M), AND" 310 PRINT "UNUSED SQUARES WITH A ( ). OUTPUT IS ON PAPER." 311 PRINT 312 PRINT "TO STOP THE PROGRAM RUN, TYPE 1 AS YOUR MOVE." 313 PRINT:PRINT 315 DIM X(64),L(76),M(76,4),Y(16) 320 FOR I = 1 TO 16 330 READ Y(I) 340 NEXT I 350 FOR I=1 TO 76 360 FOR J = 1 TO 4 370 READ M(I,J) 380 NEXT J 390 NEXT I 400 FOR I = 1 TO 64 410 LET X (I) =0 420 NEXT I 430 LET Z=1 440 PRINT "DO YOU WANT TO MOVE FIRST"; 450 INPUT S$ 460 IF LEFT$(S$,1)="N" THEN 630 470 IF LEFT$(S$,1)="Y" THEN 500 480 PRINT "INCORRECT ANSWER. PLEASE TYPE 'YES' OR 'NO'."; 490 GOTO 450 500 PRINT " " 510 PRINT "YOUR MOVE"; 520 INPUT J1 521 IF J1=1 THEN 2770 522 IF J1<>0 THEN 525 523 GOSUB 2550 524 GOTO 500 525 IF J1<111 THEN 2750 526 IF J1>444 THEN 2750 530 GOSUB 2500 540 LET K1=INT(J1/100) 550 LET J2=(J1-K1*100) 560 LET K2=INT(J2/10) 570 LET K3= J1 - K1*100 -K2*10 580 LET M=16*K1+4*K2+K3-20 590 IF X(M)=0 THEN 620 600 PRINT "THAT SQUARE IS USED, TRY AGAIN." 610 GOTO 500 620 LET X(M)=1 630 GOSUB 1640 640 J=1 650 I=1 660 IF J=1 THEN 720 670 IF J=2 THEN 790 680 IF J=3 THEN 930 690 I=I+1: IF I<=76 THEN 660 700 J=J+1: IF J<=3 THEN 650 710 GOTO 1300 720 IF L(I)<>4 THEN 690 730 PRINT "YOU WIN AS FOLLOWS"; 740 FOR J=1 TO 4 750 LET M=M(I,J) 760 GOSUB 1570 770 NEXT J 780 GOTO 1490 790 IF L(I)<>15 THEN 690 800 FOR J=1 TO 4 810 LET M=M(I,J) 820 IF X(M)<>0 THEN 860 830 LET X(M)=5 840 PRINT "MACHINE MOVES TO"; 850 GOSUB 1570 860 NEXT J 870 PRINT ", AND WINS AS FOLLOWS" 880 FOR J=1 TO 4 890 LET M=M(I,J) 900 GOSUB 1570 910 NEXT J 920 GOTO 1490 930 IF L(I)<>3 THEN 690 940 PRINT "NICE TRY. MACHINE MOVES TO"; 950 FOR J=1 TO 4 960 LET M=M(I,J) 970 IF X(M)<>0 THEN 1010 980 LET X(M)=5 990 GOSUB 1570 1000 GOTO 500 1010 NEXT J 1020 GOTO 1300 1030 I=1 1040 LET L(I)=X(M(I,1))+X(M(I,2))+X(M(I,3))+X(M(I,4)) 1050 LET L = L(I) 1060 IF L <2 THEN 1130 1070 IF L>=3 THEN 1130 1080 IF L>2 THEN 2230 1090 FOR J = 1 TO 4 1100 IF X(M(I,J))<>0 THEN 1120 1110 LET X(M(I,J))=1/8 1120 NEXT J 1130 I=I+1: IF I<=76 THEN 1040 1140 GOSUB 1640 1150 I=1 1160 IF L(I)=1/2 THEN 2360 1170 IF L(I)=1+3/8 THEN 2360 1180 I=I+1: IF I<=76 THEN 1160 1190 GOTO 1830 1200 LET Z = 1 1210 IF X(Y(Z))=0 THEN 1250 1220 LET Z=Z+1 1230 IF Z<>17 THEN 1210 1240 GOTO 1720 1250 LET M=Y(Z) 1260 LET X(M)=5 1270 PRINT "MACHINE MOVES TO"; 1280 GOSUB 1570 1290 GOTO 500 1300 LET X=X 1310 I=1 1320 LET L(I)=X(M(I,1))+X(M(I,2))+X(M(I,3))+X(M(I,4)) 1330 LET L=L(I) 1340 IF L<10 THEN 1410 1350 IF L>=11 THEN 1410 1360 IF L>10 THEN 2230 1370 FOR J=1 TO 4 1380 IF X(M(I,J))<>0 THEN 1400 1390 LET X(M(I,J))=1/8 1400 NEXT J 1410 I=I+1: IF I<=76 THEN 1320 1420 GOSUB 1640 1430 I=1 1440 IF L(I)=.5 THEN 2360 1450 IF L(I)=5+3/8 THEN 2360 1460 I=I+1: IF I<=76 THEN 1440 1470 GOSUB 2500 1480 GOTO 1030 1490 PRINT " " 1500 PRINT "DO YOU WANT TO TRY ANOTHER GAME"; 1510 INPUT X$ 1520 IF LEFT$(X$,1)="Y" THEN 400 1530 IF LEFT$(X$,1)="N" THEN 1560 1540 PRINT "INCORRECT ANSWER. PLEASE TYPE 'YES' OR 'NO'"; 1550 GOTO 1510 1560 END 1570 LET K1=INT((M-1)/16)+1 1580 LET J2=M-16*(K1-1) 1590 LET K2=INT((J2-1)/4)+1 1600 LET K3=M-(K1-1)*16-(K2-1)*4 1610 LET M=K1*100+K2*10+K3 1620 PRINT M; 1630 RETURN 1640 FOR S=1 TO 76 1650 LET J1 = M(S,1) 1660 LET J2=M(S,2) 1670 LET J3=M(S,3) 1680 LET J4=M(S,4) 1690 LET L(S)=X(J1)+X(J2)+X(J3)+X(J4) 1700 NEXT S 1710 RETURN 1720 FOR I=1 TO 64 1730 IF X(I)<>0 THEN 1800 1740 LET X(I)=5 1750 LET M=I 1760 PRINT "MACHINE LIKES"; 1770 GOSUB 1570 1780 PRINT " " 1790 GOTO 500 1800 NEXT I 1810 PRINT "THE GAME IS A DRAW." 1820 GOTO 1490 1830 FOR K=1 TO 18 1840 LET P=0 1850 FOR I=4*K-3 TO 4*K 1860 FOR J=1 TO 4 1870 LET P=P+X(M(I,J)) 1880 NEXT J 1890 NEXT I 1900 IF P<4 THEN 1940 1910 IF P<5 THEN 1970 1920 IF P<9 THEN 1940 1930 IF P<10 THEN 1970 1940 NEXT K 1950 GOSUB 2500 1960 GOTO 1200 1970 LET S=1/8 1980 FOR I=4*K-3 TO 4*K 1990 GOTO 2370 2000 NEXT I 2010 LET S=0 2020 GOTO 1980 2030 DATA 1,49,52,4,13,61,64,16,22,39,23,38,26,42,27,43 2040 DATA 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20 2050 DATA 21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38 2060 DATA 39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56 2070 DATA 57,58,59,60,61,62,63,64 2080 DATA 1,17,33,49,5,21,37,53,9,25,41,57,13,29,45,61 2090 DATA 2,18,34,50,6,22,38,54,10,26,42,58,14,30,46,62 2100 DATA 3,19,35,51,7,23,39,55,11,27,43,59,15,31,47,63 2110 DATA 4,20,36,52,8,24,40,56,12,28,44,60,16,32,48,64 2120 DATA 1,5,9,13,17,21,25,29,33,37,41,45,49,53,57,61 2130 DATA 2,6,10,14,18,22,26,30,34,38,42,46,50,54,58,62 2140 DATA 3,7,11,15,19,23,27,31,35,39,43,47,51,55,59,63 2150 DATA 4,8,12,16,20,24,28,32,36,40,44,48,52,56,60,64 2160 DATA 1,6,11,16,17,22,27,32,33,38,43,48,49,54,59,64 2170 DATA 13,10,7,4,29,26,23,20,45,42,39,36,61,58,55,52 2180 DATA 1,21,41,61,2,22,42,62,3,23,43,63,4,24,44,64 2190 DATA 49,37,25,13,50,38,26,14,51,39,27,15,52,40,28,16 2200 DATA 1,18,35,52,5,22,39,56,9,26,43,60,13,30,47,64 2210 DATA 49,34,19,4,53,38,23,8,57,42,27,12,61,46,31,16 2220 DATA 1,22,43,64,16,27,38,49,4,23,42,61,13,26,39,52 2230 FOR J=1 TO 4 2240 IF X(M(I,J))<>1/8 THEN 2330 2250 LET X(M(I,J))=5 2260 IF L(I)<5 THEN 2290 2270 PRINT "LET'S SEE YOU GET OUT OF THIS: MACHINE MOVES TO"; 2280 GOTO 2300 2290 PRINT "YOU FOX. JUST IN THE NICK OF TIME, MACHINE MOVES TO"; 2300 LET M=M(I,J) 2310 GOSUB 1570 2320 GOTO 500 2330 NEXT J 2340 PRINT "MACHINE CONCEDES THIS GAME." 2350 GOTO 1490 2360 LET S=1/8 2370 IF I-INT(I/4)*4>1 THEN 2400 2380 LET A=1 2390 GOTO 2410 2400 LET A=2 2410 FOR J=A TO 5-A STEP 5-2*A 2420 IF X(M(I,J))=S THEN 2450 2430 NEXT J 2440 GOTO 2000 2450 LET X(M(I,J))=5 2460 LET M=M(I,J) 2470 PRINT "MACHINE TAKES"; 2480 GOSUB 1570 2490 GOTO 500 2500 FOR I=1 TO 64 2510 IF X(I)<>1/8 THEN 2530 2520 LET X(I)=0 2530 NEXT I 2540 RETURN 2550 FOR XX=1 TO 9:PRINT:NEXT:FOR I=1 TO 4 2560 FOR J=1 TO 4 2562 FOR I1=1 TO J 2564 PRINT" "; 2566 NEXT I1 2570 FOR K=1 TO 4 2600 LET Q=16*I+4*J+K-20 2610 IF X(Q)<>O THEN 2630 2620 PRINT"( ) "; 2630 IF X(Q)<>5 THEN 2650 2640 PRINT"(M) "; 2650 IF X(Q)<>1 THEN 2660 2655 PRINT"(Y) "; 2660 IF X(Q)<>1/8 THEN 2670 2665 PRINT"( ) "; 2670 NEXT K 2680 PRINT 2690 PRINT 2700 NEXT J 2710 PRINT 2720 PRINT 2730 NEXT I 2735 REM PRINT CHR$(12) 2740 RETURN 2750 PRINT"INCORRECT MOVE, RETYPE IT--"; 2760 GOTO 520 2770 END 1 PRINT TAB(33);"QUEEN" 2 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 3 PRINT:PRINT:PRINT 10 DIM S(64) 11 FOR I=1 TO 64 12 READ S(I) 13 NEXT I 14 DATA 81, 71, 61, 51, 41, 31, 21, 11 15 DATA 92, 82, 72, 62, 52, 42, 32, 22 16 DATA 103, 93, 83, 73, 63, 53, 43, 33 17 DATA 114, 104, 94, 84, 74, 64, 54, 44 18 DATA 125, 115, 105, 95, 85, 75, 65, 55 19 DATA 136, 126, 116, 106, 96, 86, 76, 66 20 DATA 147, 137, 127, 117, 107, 97, 87, 77 21 DATA 158, 148, 138, 128, 118, 108, 98, 88 22 INPUT "DO YOU WANT INSTRUCTIONS";W$ 23 IF W$="NO" THEN 30 24 IF W$="YES" THEN 28 25 PRINT "PLEASE ANSWER 'YES' OR 'NO'." 26 GOTO 22 28 GOSUB 5000 29 GOTO 100 30 GOSUB 5160 90 REM ERROR CHECKS 100 PRINT "WHERE WOULD YOU LIKE TO START"; 110 INPUT M1 115 IF M1=0 THEN 232 120 T1=INT(M1/10) 130 U1=M1-10*T1 140 IF U1=1 THEN 200 150 IF U1=T1 THEN 200 160 PRINT "PLEASE READ THE DIRECTIONS AGAIN." 170 PRINT "YOU HAVE BEGUN ILLEGALLY." 175 PRINT 180 GOTO 100 200 GOSUB 2000 210 PRINT "COMPUTER MOVES TO SQUARE";M 215 IF M=158 THEN 3400 220 PRINT "WHAT IS YOUR MOVE"; 230 INPUT M1 231 IF M1<>0 THEN 239 232 PRINT 233 PRINT "IT LOOKS LIKE I HAVE WON BY FORFEIT." 234 PRINT 235 GOTO 4000 239 IF M1<=M THEN 3200 240 T1=INT(M1/10) 250 U1=M1-10*T1 260 P=U1-U 270 IF P<>0 THEN 300 280 L=T1-T 290 IF L<=0 THEN 3200 295 GOTO 200 300 IF T1-T <>P THEN 320 310 GOTO 200 320 IF T1-T <>2*P THEN 3200 330 GOTO 200 1990 REM LOCATE MOVE FOR COMPUTER 2000 IF M1=41 THEN 2180 2010 IF M1=44 THEN 2180 2020 IF M1=73 THEN 2180 2030 IF M1=75 THEN 2180 2040 IF M1=126 THEN 2180 2050 IF M1=127 THEN 2180 2060 IF M1=158 THEN 3300 2065 C=0 2070 FOR K=7 TO 1 STEP -1 2080 U=U1 2090 T=T1+K 2100 GOSUB 3500 2105 IF C=1 THEN 2160 2110 U=U+K 2120 GOSUB 3500 2125 IF C=1 THEN 2160 2130 T=T+K 2140 GOSUB 3500 2145 IF C=1 THEN 2160 2150 NEXT K 2155 GOTO 2180 2160 C=0 2170 RETURN 2180 GOSUB 3000 2190 RETURN 2990 REM RANDOM MOVE 3000 Z=RND(1) 3010 IF Z>.6 THEN 3110 3020 IF Z>.3 THEN 3070 3030 U=U1 3040 T=T1+1 3050 M=10*T+U 3060 RETURN 3070 U=U1+1 3080 T=T1+2 3090 M=10*T+U 3100 RETURN 3110 U=U1+1 3120 T=T1+1 3130 M=10*T+U 3140 RETURN 3190 REM ILLEGAL MOVE MESSAGE 3200 PRINT 3210 PRINT "Y O U C H E A T . . . TRY AGAIN"; 3220 GOTO 230 3290 REM PLAYER WINS 3300 PRINT 3310 PRINT "C O N G R A T U L A T I O N S . . ." 3320 PRINT 3330 PRINT "YOU HAVE WON--VERY WELL PLAYED." 3340 PRINT "IT LOOKS LIKE I HAVE MET MY MATCH." 3350 PRINT "THANKS FOR PLAYING---I CAN'T WIN ALL THE TIME." 3360 PRINT 3370 GOTO 4000 3390 REM COMPUTER WINS 3400 PRINT 3410 PRINT "NICE TRY, BUT IT LOOKS LIKE I HAVE WON." 3420 PRINT "THANKS FOR PLAYING." 3430 PRINT 3440 GOTO 4000 3490 REM TEST FOR COMPUTER MOVE 3500 M=10*T+U 3510 IF M=158 THEN 3570 3520 IF M=127 THEN 3570 3530 IF M=126 THEN 3570 3540 IF M=75 THEN 3570 3550 IF M=73 THEN 3570 3560 RETURN 3570 C=1 3580 GOTO 3560 3990 REM ANOTHER GAME??? 4000 PRINT "ANYONE ELSE CARE TO TRY"; 4010 INPUT Q$ 4020 PRINT 4030 IF Q$="YES" THEN 30 4040 IF Q$="NO" THEN 4050 4042 PRINT "PLEASE ANSWER 'YES' OR 'NO'." 4045 GOTO 4000 4050 PRINT:PRINT "OK --- THANKS AGAIN." 4060 STOP 4990 REM DIRECTIONS 5000 PRINT "WE ARE GOING TO PLAY A GAME BASED ON ONE OF THE CHESS" 5010 PRINT "MOVES. OUR QUEEN WILL BE ABLE TO MOVE ONLY TO THE LEFT," 5020 PRINT "DOWN, OR DIAGONALLY DOWN AND TO THE LEFT." 5030 PRINT 5040 PRINT "THE OBJECT OF THE GAME IS TO PLACE THE QUEEN IN THE LOWER" 5050 PRINT "LEFT HAND SQUARE BY ALTERNATING MOVES BETWEEN YOU AND THE" 5060 PRINT "COMPUTER. THE FIRST ONE TO PLACE THE QUEEN THERE WINS." 5070 PRINT 5080 PRINT "YOU GO FIRST AND PLACE THE QUEEN IN ANY ONE OF THE SQUARES" 5090 PRINT "ON THE TOP ROW OR RIGHT HAND COLUMN." 5100 PRINT "THAT WILL BE YOUR FIRST MOVE." 5110 PRINT "WE ALTERNATE MOVES." 5120 PRINT "YOU MAY FORFEIT BY TYPING '0' AS YOUR MOVE." 5130 PRINT "BE SURE TO PRESS THE RETURN KEY AFTER EACH RESPONSE." 5140 PRINT 5150 PRINT 5160 PRINT 5170 FOR A=0 TO 7 5180 FOR B=1 TO 8 5185 I=8*A+B 5190 PRINT S(I); 5200 NEXT B 5210 PRINT 5220 PRINT 5230 PRINT 5240 NEXT A 5250 PRINT 5260 RETURN 9999 END 10 PRINT TAB(32);"REVERSE" 20 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 30 PRINT:PRINT:PRINT 100 PRINT "REVERSE -- A GAME OF SKILL": PRINT 130 DIM A(20) 140 REM *** N=NUMBER OF NUMBERS 150 N=9 160 PRINT "DO YOU WANT THE RULES"; 170 INPUT A$ 180 IF A$="NO" THEN 210 190 GOSUB 710 200 REM *** MAKE A RANDOM LIST A(1) TO A(N) 210 A(1)=INT((N-1)*RND(1)+2) 220 FOR K=2 TO N 230 A(K)=INT(N*RND(1)+1) 240 FOR J=1 TO K-1 250 IF A(K)=A(J) THEN 230 260 NEXT J:NEXT K 280 REM *** PRINT ORIGINAL LIST AND START GAME 290 PRINT: PRINT "HERE WE GO ... THE LIST IS:" 310 T=0 320 GOSUB 610 330 PRINT "HOW MANY SHALL I REVERSE"; 340 INPUT R 350 IF R=0 THEN 520 360 IF R<=N THEN 390 370 PRINT "OOPS! TOO MANY! I CAN REVERSE AT MOST";N:GOTO 330 390 T=T+1 400 REM *** REVERSE R NUMBERS AND PRINT NEW LIST 410 FOR K=1 TO INT(R/2) 420 Z=A(K) 430 A(K)=A(R-K+1) 440 A(R-K+1)=Z 450 NEXT K 460 GOSUB 610 470 REM *** CHECK FOR A WIN 480 FOR K=1 TO N 490 IF A(K)<>K THEN 330 500 NEXT K 510 PRINT "YOU WON IT IN";T;"MOVES!!!":PRINT 520 PRINT 530 PRINT "TRY AGAIN (YES OR NO)"; 540 INPUT A$ 550 IF A$="YES" THEN 210 560 PRINT: PRINT "O.K. HOPE YOU HAD FUN!!":GOTO 999 600 REM *** SUBROUTINE TO PRINT LIST 610 PRINT:FOR K=1 TO N:PRINT A(K);:NEXT K 650 PRINT:PRINT:RETURN 700 REM *** SUBROUTINE TO PRINT THE RULES 710 PRINT:PRINT "THIS IS THE GAME OF 'REVERSE'. TO WIN, ALL YOU HAVE" 720 PRINT "TO DO IS ARRANGE A LIST OF NUMBERS (1 THROUGH";N;")" 730 PRINT "IN NUMERICAL ORDER FROM LEFT TO RIGHT. TO MOVE, YOU" 740 PRINT "TELL ME HOW MANY NUMBERS (COUNTING FROM THE LEFT) TO" 750 PRINT "REVERSE. FOR EXAMPLE, IF THE CURRENT LIST IS:" 760 PRINT:PRINT "2 3 4 5 1 6 7 8 9" 770 PRINT:PRINT "AND YOU REVERSE 4, THE RESULT WILL BE:" 780 PRINT:PRINT "5 4 3 2 1 6 7 8 9" 790 PRINT:PRINT "NOW IF YOU REVERSE 5, YOU WIN!" 800 PRINT:PRINT "1 2 3 4 5 6 7 8 9":PRINT 810 PRINT "NO DOUBT YOU WILL LIKE THIS GAME, BUT" 820 PRINT "IF YOU WANT TO QUIT, REVERSE 0 (ZERO).":PRINT: RETURN 999 END 10 PRINT TAB(30); "ROCKET" 20 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 30 PRINT:PRINT:PRINT 70 PRINT "LUNAR LANDING SIMULATION" 80 PRINT "----- ------- ----------": PRINT 100 INPUT "DO YOU WANT INSTRUCTIONS (YES OR NO)";A$ 110 IF A$="NO" THEN 390 160 PRINT 200 PRINT"YOU ARE LANDING ON THE MOON AND AND HAVE TAKEN OVER MANUAL" 210 PRINT"CONTROL 1000 FEET ABOVE A GOOD LANDING SPOT. YOU HAVE A DOWN-" 220 PRINT"WARD VELOCITY OF 50 FEET/SEC. 150 UNITS OF FUEL REMAIN." 225 PRINT 230 PRINT"HERE ARE THE RULES THAT GOVERN YOUR APOLLO SPACE-CRAFT:": PRINT 240 PRINT"(1) AFTER EACH SECOND THE HEIGHT, VELOCITY, AND REMAINING FUEL" 250 PRINT" WILL BE REPORTED VIA DIGBY YOUR ON-BOARD COMPUTER." 260 PRINT"(2) AFTER THE REPORT A '?' WILL APPEAR. ENTER THE NUMBER" 270 PRINT" OF UNITS OF FUEL YOU WISH TO BURN DURING THE NEXT" 280 PRINT" SECOND. EACH UNIT OF FUEL WILL SLOW YOUR DESCENT BY" 290 PRINT" 1 FOOT/SEC." 310 PRINT"(3) THE MAXIMUM THRUST OF YOUR ENGINE IS 30 FEET/SEC/SEC" 320 PRINT" OR 30 UNITS OF FUEL PER SECOND." 330 PRINT"(4) WHEN YOU CONTACT THE LUNAR SURFACE. YOUR DESCENT ENGINE" 340 PRINT" WILL AUTOMATICALLY SHUT DOWN AND YOU WILL BE GIVEN A" 350 PRINT" REPORT OF YOUR LANDING SPEED AND REMAINING FUEL." 360 PRINT"(5) IF YOU RUN OUT OF FUEL THE '?' WILL NO LONGER APPEAR" 370 PRINT" BUT YOUR SECOND BY SECOND REPORT WILL CONTINUE UNTIL" 380 PRINT" YOU CONTACT THE LUNAR SURFACE.":PRINT 390 PRINT"BEGINNING LANDING PROCEDURE..........":PRINT 400 PRINT"G O O D L U C K ! ! !" 420 PRINT:PRINT 430 PRINT"SEC FEET SPEED FUEL PLOT OF DISTANCE" 450 PRINT 455 T=0:H=1000:V=50:F=150 490 PRINT T;TAB(6);H;TAB(16);V;TAB(26);F;TAB(35);"I";TAB(H/15);"*" 500 INPUT B 510 IF B<0 THEN 650 520 IF B>30 THEN B=30 530 IF B>F THEN B=F 540 V1=V-B+5 560 F=F-B 570 H=H- .5*(V+V1) 580 IF H<=0 THEN 670 590 T=T+1 600 V=V1 610 IF F>0 THEN 490 615 IF B=0 THEN 640 620 PRINT"**** OUT OF FUEL ****" 640 PRINT T;TAB(4);H;TAB(12);V;TAB(20);F;TAB(29);"I";TAB(H/12+29);"*" 650 B=0 660 GOTO 540 670 PRINT"***** CONTACT *****" 680 H=H+ .5*(V1+V) 690 IF B=5 THEN 720 700 D=(-V+SQR(V*V+H*(10-2*B)))/(5-B) 710 GOTO 730 720 D=H/V 730 V1=V+(5-B)*D 760 PRINT"TOUCHDOWN AT";T+D;"SECONDS." 770 PRINT"LANDING VELOCITY=";V1;"FEET/SEC." 780 PRINT F;"UNITS OF FUEL REMAINING." 790 IF V1<>0 THEN 810 800 PRINT"CONGRATULATIONS! A PERFECT LANDING!!" 805 PRINT"YOUR LICENSE WILL BE RENEWED.......LATER." 810 IF ABS(V1)<2 THEN 840 820 PRINT"***** SORRY, BUT YOU BLEW IT!!!!" 830 PRINT"APPROPRIATE CONDOLENCES WILL BE SENT TO YOUR NEXT OF KIN." 840 PRINT:PRINT:PRINT 850 INPUT "ANOTHER MISSION";A$ 860 IF A$="YES" THEN 390 870 PRINT: PRINT "CONTROL OUT.": PRINT 999 END 10 PRINT TAB(21);"GAME OF ROCK, SCISSORS, PAPER" 20 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 25 PRINT:PRINT:PRINT 30 INPUT "HOW MANY GAMES";Q 40 IF Q<11 THEN 60 50 PRINT "SORRY, BUT WE AREN'T ALLOWED TO PLAY THAT MANY.": GOTO 30 60 FOR G=1 TO Q 70 PRINT: PRINT "GAME NUMBER";G 80 X=INT(RND(1)*3+1) 90 PRINT "3=ROCK...2=SCISSORS...1=PAPER" 100 INPUT "1...2...3...WHAT'S YOUR CHOICE";K 110 IF (K-1)*(K-2)*(K-3)<>0 THEN PRINT "INVALID.": GOTO 90 120 PRINT "THIS IS MY CHOICE..." 130 ON X GOTO 140,150,160 140 PRINT "...PAPER": GOTO 170 150 PRINT "...SCISSORS": GOTO 170 160 PRINT "...ROCK" 170 IF X=K THEN 250 180 IF X>K THEN 230 190 IF X=1 THEN 210 200 PRINT "YOU WIN!!!":H=H+1: GOTO 260 210 IF K<>3 THEN 200 220 PRINT "WOW! I WIN!!!":C=C+1:GOTO 260 230 IF K<>1 OR X<>3 THEN 220 240 GOTO 200 250 PRINT "TIE GAME. NO WINNER." 260 NEXT G 270 PRINT: PRINT "HERE IS THE FINAL GAME SCORE:" 280 PRINT "I HAVE WON";C;"GAME(S)." 290 PRINT "YOU HAVE WON";H;"GAME(S)." 300 PRINT "AND";Q-(C+H);"GAME(S) ENDED IN A TIE." 310 PRINT: PRINT "THANKS FOR PLAYING!!" 320 END 10 PRINT TAB(32);"ROULETTE" 20 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 30 PRINT:PRINT:PRINT 40 PRINT "ENTER THE CURRENT DATE (AS IN 'JANUARY 23, 1979') -"; 50 INPUT D$,E$ 1000 REM-ROULETTE 1010 REM-DAVID JOSLIN 1020 PRINT "WELCOME TO THE ROULETTE TABLE" 1030 PRINT 1040 PRINT "DO YOU WANT INSTRUCTIONS"; 1050 INPUT Y$ 1060 IF LEFT$(Y$,1)="N" THEN 1550 1070 PRINT 1080 PRINT "THIS IS THE BETTING LAYOUT" 1090 PRINT " (*=RED)" 1100 PRINT 1110 PRINT " 1* 2 3*" 1120 PRINT " 4 5* 6 " 1130 PRINT " 7* 8 9*" 1140 PRINT "10 11 12*" 1150 PRINT "---------------" 1160 PRINT "13 14* 15 " 1170 PRINT "16* 17 18*" 1180 PRINT "19* 20 21*" 1190 PRINT "22 23* 24 " 1200 PRINT "---------------" 1210 PRINT "25* 26 27*" 1220 PRINT "28 29 30*" 1230 PRINT "31 32* 33 " 1240 PRINT "34* 35 36*" 1250 PRINT "---------------" 1260 PRINT " 00 0 " 1270 PRINT 1280 PRINT "TYPES OF BETS" 1290 PRINT 1300 PRINT "THE NUMBERS 1 TO 36 SIGNIFY A STRAIGHT BET" 1310 PRINT "ON THAT NUMBER." 1320 PRINT "THESE PAY OFF 35:1" 1330 PRINT 1340 PRINT "THE 2:1 BETS ARE:" 1350 PRINT " 37) 1-12 40) FIRST COLUMN" 1360 PRINT " 38) 13-24 41) SECOND COLUMN" 1370 PRINT " 39) 25-36 42) THIRD COLUMN" 1380 PRINT 1390 PRINT "THE EVEN MONEY BETS ARE:" 1400 PRINT " 43) 1-18 46) ODD" 1410 PRINT " 44) 19-36 47) RED" 1420 PRINT " 45) EVEN 48) BLACK" 1430 PRINT 1440 PRINT " 49)0 AND 50)00 PAY OFF 35:1" 1450 PRINT " NOTE: 0 AND 00 DO NOT COUNT UNDER ANY" 1460 PRINT " BETS EXCEPT THEIR OWN." 1470 PRINT 1480 PRINT "WHEN I ASK FOR EACH BET, TYPE THE NUMBER" 1490 PRINT "AND THE AMOUNT, SEPARATED BY A COMMA." 1500 PRINT "FOR EXAMPLE: TO BET $500 ON BLACK, TYPE 48,500" 1510 PRINT "WHEN I ASK FOR A BET." 1520 PRINT 1530 PRINT "THE MINIMUM BET IS $5, THE MAXIMUM IS $500." 1540 PRINT 1550 REM-PROGRAM BEGINS HERE 1560 REM-TYPE OF BET(NUMBER) ODDS 1570 REM DON'T NEED TO DIMENSION STRINGS 1580 DIM B(100),C(100),T(100),X(38) 1590 DIM A(50) 1600 FOR I=1 TO 38: X(I)=0: NEXT I: REM MAT X=ZER 1610 P=1000 1620 D=100000. 1630 PRINT "HOW MANY BETS"; 1640 INPUT Y 1650 IF Y<1 OR Y<>INT(Y) THEN 1630 1660 FOR I=1 TO 50: A(I)=0: NEXT I: REM MAT A=ZER 1670 FOR C=1 TO Y 1680 PRINT "NUMBER";C; 1690 INPUT X,Z 1700 B(C)=Z 1710 T(C)=X 1720 IF X<1 OR X>50 OR X<>INT(X) THEN 1680 1730 IF Z<1 OR Z<>INT(Z) THEN 1680 1740 IF Z<5 OR Z>500 THEN 1680 1750 IF A(X)=0 THEN 1780 1760 PRINT "YOU MADE THAT BET ONCE ALREADY,DUM-DUM" 1770 GOTO 1680 1780 A(X)=1 1790 NEXT C 1800 PRINT "SPINNING" 1810 PRINT 1820 PRINT 1830 S=INT(RND(1)*100) 1840 IF S=0 OR S>38 THEN 1830 1850 X(S)=X(S)+1 1860 IF S<37 THEN 1920 1870 IF S=37 THEN 1900 1880 PRINT "00" 1890 GOTO 2020 1900 PRINT "0" 1910 GOTO 2020 1920 RESTORE 1930 FOR I1=1 TO 18 1940 READ R 1950 IF R=S THEN 2000 1960 NEXT I1 1970 A$="BLACK" 1980 PRINT S;A$ 1990 GOTO 2020 2000 A$="RED" 2010 GOTO 1980 2020 PRINT 2030 FOR C=1 TO Y 2040 IF T(C)<37 THEN 2710 2050 ON T(C)-36 GOTO 2090,2190,2220,2250,2300,2350,2400,2470,2500 2060 ON T(C)-45 GOTO 2530,2560,2630 2070 GOTO 2710 2080 STOP 2090 REM 1-12(37) 2:1 2100 IF S <= 12 THEN 2150 2110 PRINT "YOU LOSE";B(C);"DOLLARS ON BET";C 2120 D=D+B(C) 2130 P=P-B(C) 2140 GOTO 2180 2150 PRINT "YOU WIN";B(C)*2;"DOLLARS ON BET"C 2160 D=D-B(C)*2 2170 P=P+B(C)*2 2180 GOTO 2810 2190 REM 13-24(38) 2:1 2200 IF S>12 AND S<25 THEN 2150 2210 GOTO 2110 2220 REM 25-36(39) 2:1 2230 IF S>24 AND S<37 THEN 2150 2240 GOTO 2110 2250 REM FIRST COLUMN(40) 2:1 2260 FOR I=1 TO 34 STEP 3 2270 IF S=I THEN 2150 2280 NEXT I 2290 GOTO 2110 2300 REM SECOND COLUMN(41) 2:1 2310 FOR I=2 TO 35 STEP 3 2320 IF S=I THEN 2150 2330 NEXT I 2340 GOTO 2110 2350 REM THIRD COLUMN(42) 2:1 2360 FOR I=3 TO 36 STEP 3 2370 IF S=I THEN 2150 2380 NEXT I 2390 GOTO 2110 2400 REM 1-18(43) 1:1 2410 IF S<19 THEN 2430 2420 GOTO 2110 2430 PRINT "YOU WIN";B(C);"DOLLARS ON BET";C 2440 D=D-B(C) 2450 P=P+B(C) 2460 GOTO 2810 2470 REM 19-36(44) 1:1 2480 IF S<37 AND S>18 THEN 2430 2490 GOTO 2110 2500 REM EVEN(45) 1:1 2510 IF S/2=INT(S/2) AND S<37 THEN 2430 2520 GOTO 2110 2530 REM ODD(46) 1:1 2540 IF S/2<>INT(S/2) AND S<37 THEN 2430 2550 GOTO 2110 2560 REM RED(47) 1:1 2570 RESTORE 2580 FOR I=1 TO 18 2590 READ R 2600 IF S=R THEN 2430 2610 NEXT I 2620 GOTO 2110 2630 REM BLACK(48) 1:1 2640 RESTORE 2650 FOR I=1 TO 18 2660 READ R 2670 IF S=R THEN 2110 2680 NEXT I 2690 IF S>36 THEN 2110 2700 GOTO 2430 2710 REM--1TO36,0,00(1-36,49,50)35:1 2720 IF T(C)<49 THEN 2760 2730 IF T(C)=49 AND S=37 THEN 2780 2740 IF T(C)=50 AND S=38 THEN 2780 2750 GOTO 2110 2760 IF T(C)=S THEN 2780 2770 GOTO 2110 2780 PRINT "YOU WIN";B(C)*35;"DOLLARS ON BET";C 2790 D=D-B(C)*35 2800 P=P+B(C)*35 2810 NEXT C 2820 PRINT 2830 PRINT "TOTALS:","ME","YOU" 2840 PRINT " ",D,P 2850 IF P>0 THEN 2880 2860 PRINT "OOPS! YOU JUST SPENT YOUR LAST DOLLAR!" 2870 GOTO 3190 2880 IF D>0 THEN 2920 2890 PRINT "YOU BROKE THE HOUSE!" 2900 P=101000. 2910 GOTO 2960 2920 PRINT "AGAIN"; 2930 INPUT Y$ 2940 IF LEFT$(Y$,1)="Y" THEN 1630 2950 DATA 1,3,5,7,9,12,14,16,18,19,21,23,25,27,30,32,34,36 2960 IF P<1 THEN 3190 2970 PRINT "TO WHOM SHALL I MAKE THE CHECK"; 2980 INPUT B$ 2990 PRINT 3000 FOR I=1 TO 72: PRINT "-";: NEXT I: REM PRINT 72 DASHES 3010 PRINT TAB(50);"CHECK NO. ";INT(RND(1)*100) 3020 PRINT 3030 GOSUB 3230 3040 PRINT TAB(40);M$ 3050 PRINT 3060 PRINT 3070 PRINT "PAY TO THE ORDER OF-----";B$;"-----$ "; 3080 PRINT P 3090 PRINT 3100 PRINT 3110 PRINT TAB(10),"THE MEMORY BANK OF NEW YORK" 3120 PRINT 3130 PRINT TAB(40),"THE COMPUTER" 3140 PRINT TAB(40)"----------X-----" 3150 PRINT 3160 FOR I=1 TO 62: PRINT "-";: NEXT I 3170 PRINT "COME BACK SOON!" 3180 GOTO 3210 3190 PRINT "THANKS FOR YOUR MONEY." 3200 PRINT "I'LL USE IT TO BUY A SOLID GOLD ROULETTE WHEEL" 3210 PRINT 3220 GOTO 3420 3230 REM 3240 REM THIS ROUTINE RETURNS THE CURRENT DATE IN M$ 3250 REM IF YOU HAVE SYSTEM FUNCTIONS TO HANDLE THIS 3260 REM THEY CAN BE USED HERE. HOWEVER IN THIS 3270 REM PROGRAM, WE JUST INPUT THE DATE AT THE START 3280 REM THE GAME 3290 REM 3300 REM THE DATE IS RETURNED IN VARIABLE M$ 3310 M$=D$+", "+E$ 3320 RETURN 3420 END 1 PRINT TAB(28);"RUSSIAN ROULETTE" 2 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 3 PRINT:PRINT:PRINT 5 PRINT "THIS IS A GAME OF >>>>>>>>>>RUSSIAN ROULETTE." 10 PRINT:PRINT "HERE IS A REVOLVER." 20 PRINT "TYPE '1' TO SPIN CHAMBER AND PULL TRIGGER." 22 PRINT "TYPE '2' TO GIVE UP." 23 PRINT "GO"; 25 N=0 30 INPUT I 31 IF I<>2 THEN 35 32 PRINT " CHICKEN!!!!!" 33 GOTO 72 35 N=N+1 40 IF RND(1)>.833333 THEN 70 45 IF N>10 THEN 80 50 PRINT "- CLICK -" 60 PRINT: GOTO 30 70 PRINT " BANG!!!!! YOU'RE DEAD!" 71 PRINT "CONDOLENCES WILL BE SENT TO YOUR RELATIVES." 72 PRINT:PRINT:PRINT 75 PRINT "...NEXT VICTIM...":GOTO 20 80 PRINT "YOU WIN!!!!!" 85 PRINT "LET SOMEONE ELSE BLOW HIS BRAINS OUT." 90 GOTO 10 99 END 1000 PRINT TAB(33);"SALVO" 1010 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 1020 PRINT:PRINT:PRINT 1030 REM 1040 DIM A(10,10),B(10,10),C(7),D(7),E(12),F(12),G(12),H(12),K(10,10) 1050 Z8=0 1060 FOR W=1 TO 12 1070 E(W)=-1 1080 H(W)=-1 1090 NEXT W 1100 FOR X=1 TO 10 1110 FOR Y=1 TO 10 1120 B(X,Y)=0 1130 NEXT Y 1140 NEXT X 1150 FOR X=1 TO 12 1160 F(X)=0 1170 G(X)=0 1180 NEXT X 1190 FOR X=1 TO 10 1200 FOR Y=1 TO 10 1210 A(X,Y)=0 1220 NEXT Y 1230 NEXT X 1240 FOR K=4 TO 1 STEP -1 1250 U6=0 1260 GOSUB 2910 1270 DEF FNA(K)=(5-K)*3-2*INT(K/4)+SGN(K-1)-1 1280 DEF FNB(K)=K+INT(K/4)-SGN(K-1) 1290 IF V+V2+V*V2=0 THEN 1260 1300 IF Y+V*FNB(K)>10 THEN 1260 1310 IF Y+V*FNB(K)<1 THEN 1260 1320 IF X+V2*FNB(K)>10 THEN 1260 1330 IF X+V2*FNB(K)<1 THEN 1260 1340 U6=U6+1 1350 IF U6>25 THEN 1190 1360 FOR Z=0 TO FNB(K) 1370 F(Z+FNA(K))=X+V2*Z 1380 G(Z+FNA(K))=Y+V*Z 1390 NEXT Z 1400 U8=FNA(K) 1405 IF U8>U8+FNB(K) THEN 1460 1410 FOR Z2= U8 TO U8+FNB(K) 1415 IF U8<2 THEN 1450 1420 FOR Z3=1 TO U8-1 1430 IF SQR((F(Z3)-F(Z2))^2 + (G(Z3)-G(Z2))^2) < 3.59 THEN 1260 1440 NEXT Z3 1450 NEXT Z2 1460 FOR Z=0 TO FNB(K) 1470 A(F(Z+U8),G(Z+U8))=.5+SGN(K-1)*(K-1.5) 1480 NEXT Z 1490 NEXT K 1500 PRINT "ENTER COORDINATES FOR..." 1510 PRINT "BATTLESHIP" 1520 FOR X=1 TO 5 1530 INPUT Y,Z 1540 B(Y,Z)=3 1550 NEXT X 1560 PRINT "CRUISER" 1570 FOR X=1 TO 3 1580 INPUT Y,Z 1590 B(Y,Z)=2 1600 NEXT X 1610 PRINT "DESTROYER<A>" 1620 FOR X=1 TO 2 1630 INPUT Y,Z 1640 B(Y,Z)=1 1650 NEXT X 1660 PRINT "DESTROYER<B>" 1670 FOR X=1 TO 2 1680 INPUT Y,Z 1690 B(Y,Z)=.5 1700 NEXT X 1710 PRINT "DO YOU WANT TO START"; 1720 INPUT J$ 1730 IF J$<>"WHERE ARE YOUR SHIPS?" THEN 1890 1740 PRINT "BATTLESHIP" 1750 FOR Z=1 TO 5 1760 PRINT F(Z);G(Z) 1770 NEXT Z 1780 PRINT "CRUISER" 1790 PRINT F(6);G(6) 1800 PRINT F(7);G(7) 1810 PRINT F(8);G(8) 1820 PRINT "DESTROYER<A>" 1830 PRINT F(9);G(9) 1840 PRINT F(10);G(10) 1850 PRINT "DESTROYER<B>" 1860 PRINT F(11);G(11) 1870 PRINT F(12);G(12) 1880 GOTO 1710 1890 C=0 1900 PRINT "DO YOU WANT TO SEE MY SHOTS"; 1910 INPUT K$ 1920 PRINT 1930 IF J$<>"YES" THEN 2620 1940 REM*******************START 1950 IF J$<>"YES" THEN 1990 1960 C=C+1 1970 PRINT 1980 PRINT "TURN";C 1990 A=0 2000 FOR W=.5 TO 3 STEP .5 2010 FOR X=1 TO 10 2020 FOR Y=1 TO 10 2030 IF B(X,Y)=W THEN 2070 2040 NEXT Y 2050 NEXT X 2060 GOTO 2080 2070 A=A+INT(W+.5) 2080 NEXT W 2090 FOR W=1 TO 7 2100 C(W)=0 2110 D(W)=0 2120 F(W)=0 2130 G(W)=0 2140 NEXT W 2150 P3=0 2160 FOR X=1 TO 10 2170 FOR Y=1 TO 10 2180 IF A(X,Y)>10 THEN 2200 2190 P3=P3+1 2200 NEXT Y 2210 NEXT X 2220 PRINT "YOU HAVE";A;"SHOTS." 2230 IF P3>=A THEN 2260 2240 PRINT "YOU HAVE MORE SHOTS THAN THERE ARE BLANK SQUARES." 2250 GOTO 2890 2260 IF A<>0 THEN 2290 2270 PRINT "I HAVE WON." 2280 STOP 2290 FOR W=1 TO A 2300 INPUT X,Y 2310 IF X<>INT(X) THEN 2370 2320 IF X>10 THEN 2370 2330 IF X<1 THEN 2370 2340 IF Y<>INT(Y) THEN 2370 2350 IF Y>10 THEN 2370 2360 IF Y>=1 THEN 2390 2370 PRINT "ILLEGAL, ENTER AGAIN." 2380 GOTO 2300 2390 IF A(X,Y)>10 THEN 2440 2400 C(W)=X 2410 D(W)=Y 2420 NEXT W 2430 GOTO 2460 2440 PRINT "YOU SHOT THERE BEFORE ON TURN";A(X,Y)-10 2450 GOTO 2300 2460 FOR W=1 TO A 2470 IF A(C(W),D(W))=3 THEN 2540 2480 IF A(C(W),D(W))=2 THEN 2560 2490 IF A(C(W),D(W))=1 THEN 2580 2500 IF A(C(W),D(W))=.5 THEN 2600 2510 A(C(W),D(W))=10+C 2520 NEXT W 2530 GOTO 2620 2540 PRINT "YOU HIT MY BATTLESHIP." 2550 GOTO 2510 2560 PRINT "YOU HIT MY CRUISER." 2570 GOTO 2510 2580 PRINT "YOU HIT MY DESTROYER<A>." 2590 GOTO 2510 2600 PRINT "YOU HIT MY DESTROYER<B>." 2610 GOTO 2510 2620 A=0 2630 IF J$="YES" THEN 2670 2640 C=C+1 2650 PRINT 2660 PRINT "TURN";C 2670 A=0 2680 FOR W=.5 TO 3 STEP .5 2690 FOR X=1 TO 10 2700 FOR Y=1 TO 10 2710 IF A(X,Y)=W THEN 2750 2720 NEXT Y 2730 NEXT X 2740 GOTO 2760 2750 A=A+INT(W+.5) 2760 NEXT W 2770 P3=0 2780 FOR X=1 TO 10 2790 FOR Y=1 TO 10 2800 IF A(X,Y)>10 THEN 2820 2810 P3=P3+1 2820 NEXT Y 2830 NEXT X 2840 PRINT "I HAVE";A;"SHOTS." 2850 IF P3>A THEN 2880 2860 PRINT "I HAVE MORE SHOTS THAN BLANK SQUARES." 2870 GOTO 2270 2880 IF A<>0 THEN 2960 2890 PRINT "YOU HAVE WON." 2900 STOP 2910 X=INT(RND(1)*10+1) 2920 Y=INT(RND(1)*10+1) 2930 V=INT(3*RND(1)-1) 2940 V2=INT(3*RND(1)-1) 2950 RETURN 2960 FOR W=1 TO 12 2970 IF H(W)>0 THEN 3800 2980 NEXT W 2990 REM*******************RANDOM 3000 W=0 3010 R3=0 3020 GOSUB 2910 3030 RESTORE 3040 R2=0 3050 R3=R3+1 3060 IF R3>100 THEN 3010 3070 IF X>10 THEN 3110 3080 IF X>0 THEN 3120 3090 X=1+INT(RND(1)*2.5) 3100 GOTO 3120 3110 X=10-INT(RND(1)*2.5) 3120 IF Y>10 THEN 3160 3130 IF Y>0 THEN 3270 3140 Y=1+INT(RND(1)*2.5) 3150 GOTO 3270 3160 Y=10-INT(RND(1)*2.5) 3170 GOTO 3270 3180 F(W)=X 3190 G(W)=Y 3200 IF W=A THEN 3380 3210 IF R2=6 THEN 3030 3220 READ X1,Y1 3230 R2=R2+1 3240 DATA 1,1,-1,1,1,-3,1,1,0,2,-1,1 3250 X=X+X1 3260 Y=Y+Y1 3270 IF X>10 THEN 3210 3280 IF X<1 THEN 3210 3290 IF Y>10 THEN 3210 3300 IF Y<1 THEN 3210 3310 IF B(X,Y)>10 THEN 3210 3320 FOR Q9=1 TO W 3330 IF F(Q9)<>X THEN 3350 3340 IF G(Q9)=Y THEN 3210 3350 NEXT Q9 3360 W=W+1 3370 GOTO 3180 3380 IF K$<>"YES" THEN 3420 3390 FOR Z5=1 TO A 3400 PRINT F(Z5);G(Z5) 3410 NEXT Z5 3420 FOR W=1 TO A 3430 IF B(F(W),G(W))=3 THEN 3500 3440 IF B(F(W),G(W))=2 THEN 3520 3450 IF B(F(W),G(W))=1 THEN 3560 3460 IF B(F(W),G(W))=.5 THEN 3540 3470 B(F(W),G(W))=10+C 3480 NEXT W 3490 GOTO 1950 3500 PRINT "I HIT YOUR BATTLESHIP" 3510 GOTO 3570 3520 PRINT "I HIT YOUR CRUISER" 3530 GOTO 3570 3540 PRINT "I HIT YOUR DESTROYER<B>" 3550 GOTO 3570 3560 PRINT "I HIT YOUR DESTROYER<A>" 3570 FOR Q=1 TO 12 3580 IF E(Q)<>-1 THEN 3730 3590 E(Q)=10+C 3600 H(Q)=B(F(W),G(W)) 3610 M3=0 3620 FOR M2=1 TO 12 3630 IF H(M2)<>H(Q) THEN 3650 3640 M3=M3+1 3650 NEXT M2 3660 IF M3<>INT(H(Q)+.5)+1+INT(INT(H(Q)+.5)/3) THEN 3470 3670 FOR M2=1 TO 12 3680 IF H(M2)<>H(Q) THEN 3710 3690 E(M2)=-1 3700 H(M2)=-1 3710 NEXT M2 3720 GOTO 3470 3730 NEXT Q 3740 PRINT "PROGRAM ABORT:" 3750 FOR Q=1 TO 12 3760 PRINT "E(";Q;") =";E(Q) 3770 PRINT "H(";Q;") =";H(Q) 3780 NEXT Q 3790 STOP 3800 REM************************USINGEARRAY 3810 FOR R=1 TO 10 3820 FOR S=1 TO 10 3830 K(R,S)=0 3840 NEXT S 3850 NEXT R 3860 FOR U=1 TO 12 3870 IF E(U)<10 THEN 4020 3880 FOR R=1 TO 10 3890 FOR S=1 TO 10 3900 IF B(R,S)<10 THEN 3930 3910 K(R,S)=-10000000 3920 GOTO 4000 3930 FOR M=SGN(1-R) TO SGN(10-R) 3940 FOR N=SGN(1-S) TO SGN(10-S) 3950 IF N+M+N*M=0 THEN 3980 3960 IF B(R+M,S+N)<>E(U) THEN 3980 3970 K(R,S)=K(R,S)+E(U)-S*INT(H(U)+.5) 3980 NEXT N 3990 NEXT M 4000 NEXT S 4010 NEXT R 4020 NEXT U 4030 FOR R=1 TO A 4040 F(R)=R 4050 G(R)=R 4060 NEXT R 4070 FOR R=1 TO 10 4080 FOR S=1 TO 10 4090 Q9=1 4100 FOR M=1 TO A 4110 IF K(F(M),G(M))>=K(F(Q9),G(Q9)) THEN 4130 4120 Q9=M 4130 NEXT M 4131 IF R>A THEN 4140 4132 IF R=S THEN 4210 4140 IF K(R,S)<K(F(Q9),G(Q9)) THEN 4210 4150 FOR M=1 TO A 4160 IF F(M)<>R THEN 4190 4170 IF G(M)=S THEN 4210 4180 NEXT M 4190 F(Q9)=R 4200 G(Q9)=S 4210 NEXT S 4220 NEXT R 4230 GOTO 3380 4240 END 10 PRINT TAB(30);"SINE WAVE" 20 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 30 PRINT: PRINT: PRINT: PRINT: PRINT 40 REMARKABLE PROGRAM BY DAVID AHL 50 B=0 100 REM START LONG LOOP 110 FOR T=0 TO 40 STEP .25 120 A=INT(26+25*SIN(T)) 130 PRINT TAB(A); 140 IF B=1 THEN 180 150 PRINT "CREATIVE" 160 B=1 170 GOTO 200 180 PRINT "COMPUTING" 190 B=0 200 NEXT T 999 END 10 PRINT TAB(33);"SLALOM" 20 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 30 PRINT:PRINT:PRINT 310 PRINT "HOW MANY GATES DOES THIS COURSE HAVE (1 TO 25)"; 320 INPUT V 330 IF V>25 THEN 360 340 IF V<1 THEN 390 350 GOTO 1440 360 PRINT "25 IS THE LIMIT." 370 LET V=25 380 GOTO 1440 390 PRINT "TRY AGAIN," 400 GOTO 310 410 PRINT "RATE YOURSELF AS A SKIER, (1=WORST, 3=BEST)"; 420 INPUT A 430 IF A<1 THEN 460 440 IF A>3 THEN 460 450 GOTO 480 460 PRINT "THE BOUNDS ARE 1-3" 470 GOTO 410 480 PRINT"THE STARTER COUNTS DOWN...5...4...3...2...1...GO!"; 490 REM 500 LET T=0 510 LET S=INT(RND(1)*(18-9)+9) 520 PRINT 525 PRINT "YOU'RE OFF!" 530 FOR O=1 TO V 540 READ Q 550 PRINT 555 PRINT "HERE COMES GATE #";STR$(O);":" 560 PRINT S;"M.P.H." 570 LET S1=S 580 PRINT "OPTION"; 590 INPUT O1 600 IF O1=0 THEN 970 610 IF O1>8 THEN 1420 620 IF O1<1 THEN 1420 630 GOSUB 990 640 IF S<7 THEN 1390 650 LET T=T+(Q-S+1) 660 IF S>Q THEN 1630 670 NEXT O 680 PRINT:PRINT "YOU TOOK";(T+RND(1));"SECONDS." 690 LET M=T 700 LET M=M/V 710 IF M<1.5-(A*.1) THEN 1650 720 IF M<2.9-(A*.1) THEN 1680 730 IF M<4.4-(A*.01) THEN 1710 740 PRINT:PRINT "DO YOU WANT TO RACE AGAIN"; 750 INPUT B$ 760 REM 770 IF B$="NO" THEN 1740 780 IF B$="YES" THEN 480 790 PRINT "PLEASE TYPE 'YES' OR 'NO'" 800 GOTO 740 810 STOP 820 PRINT 825 PRINT "*** SLALOM: THIS IS THE 1976 WINTER OLYMPIC GIANT SLALOM. YOU ARE" 830 PRINT " THE AMERICAN TEAM'S ONLY HOPE OF A GOLD MEDAL." 840 PRINT 845 PRINT " 0 -- TYPE THIS IS YOU WANT TO SEE HOW LONG YOU'VE TAKEN." 850 PRINT " 1 -- TYPE THIS IF YOU WANT TO SPEED UP A LOT." 860 PRINT " 2 -- TYPE THIS IF YOU WANT TO SPEED UP A LITTLE." 870 PRINT " 3 -- TYPE THIS IF YOU WANT TO SPEED UP A TEENSY." 880 PRINT " 4 -- TYPE THIS IF YOU WANT TO KEEP GOING THE SAME SPEED." 890 PRINT " 5 -- TYPE THIS IF YOU WANT TO CHECK A TEENSY." 900 PRINT " 6 -- TYPE THIS IF YOU WANT TO CHECK A LITTLE." 910 PRINT " 7 -- TYPE THIS IF YOU WANT TO CHECK A LOT." 920 PRINT " 8 -- TYPE THIS IF YOU WANT TO CHEAT AND TRY TO SKIP A GATE." 930 PRINT 935 PRINT " THE PLACE TO USE THESE OPTIONS IS WHEN THE COMPUTER ASKS:" 940 PRINT 945 PRINT "OPTION?" 950 PRINT 955 PRINT " GOOD LUCK!" 957 PRINT 960 GOTO 1470 970 PRINT "YOU'VE TAKEN";(T+RND(1));"SECONDS." 980 GOTO 580 990 ON O1 GOTO 1130,1010,1170,1080,1190,1100,1150,1210 1000 STOP 1010 LET S=S+INT(RND(1)*(5-3)+3) 1020 PRINT S;"M.P.H." 1030 IF S>Q THEN 1290 1040 IF S>Q-1 THEN 1060 1050 RETURN 1060 PRINT "CLOSE ONE!" 1070 RETURN 1080 PRINT S;"M.P.H." 1090 GOTO 1030 1100 LET S=S-INT(RND(1)*(5-3)+3) 1110 PRINT S;"M.P.H." 1120 GOTO 1030 1130 LET S=S+INT(RND(1)*(10-5)+5) 1140 GOTO 1080 1150 LET S=S-INT(RND(1)*(10-5)+5) 1160 GOTO 1110 1170 LET S=S+INT(RND(1)*(4-1)+1) 1180 GOTO 1110 1190 LET S=S-INT(RND(1)*(4-1)+1) 1200 GOTO 1110 1210 PRINT "***CHEAT" 1220 IF RND(1)<.7 THEN 1260 1230 PRINT "YOU MADE IT!" 1240 LET T=T+1.5 1250 RETURN 1260 PRINT "AN OFFICIAL CAUGHT YOU!" 1270 PRINT "YOU TOOK";(T+RND(1));"SECONDS." 1280 GOTO 740 1290 IF RND(1)<((S-Q)*.1)+.2 THEN 1320 1300 PRINT "YOU WENT OVER THE NAXIMUM SPEED AND MADE IT!" 1310 RETURN 1320 PRINT "YOU WENT OVER THE MAXIMUM SPEED AND "; 1330 IF RND(1)<.5 THEN 1370 1340 PRINT "WIPED OUT!" 1350 PRINT "YOU TOOK";(T+RND(1));"SECONDS" 1360 GOTO 740 1370 PRINT "SNAGGED A FLAG!" 1380 GOTO 1350 1390 PRINT "LET'S BE REALISTIC, OK? LET'S GO BACK AND TRY AGAIN..." 1400 LET S=S1 1410 GOTO 550 1420 PRINT "WHAT?" 1430 GOTO 580 1440 PRINT 1445 PRINT "TYPE ";CHR$(34);"INS";CHR$(34);" FOR INSTRUCTIONS" 1450 PRINT "TYPE ";CHR$(34);"MAX";CHR$(34);" FOR APPROXIMATE MAXIMUM SPEEDS" 1460 PRINT "TYPE ";CHR$(34);"RUN";CHR$(34);" FOR THE BEGINNING OF THE RACE" 1470 PRINT "COMMAND--"; 1480 INPUT A$ 1490 REM 1500 IF A$="INS" THEN 820 1510 IF A$="MAX" THEN 1550 1520 IF A$="RUN" THEN 410 1530 PRINT CHR$(34);A$;CHR$(34);" IS AN ILLEGAL COMMAND--RETRY"; 1540 GOTO 1480 1550 PRINT "GATE MAX" 1560 PRINT " # M.P.H." 1570 PRINT"----------" 1580 FOR B=1 TO V 1590 READ Q 1600 PRINT B;" ";Q 1610 NEXT B 1620 GOTO 1470 1630 LET T=T+.5 1640 GOTO 670 1650 PRINT "YOU WON A GOLD MEDAL!" 1660 LET G(1)=G(1)+1 1670 GOTO 1730 1680 PRINT "YOU WON A SILVER MEDAL" 1690 LET S(1)=S(1)+1 1700 GOTO 1730 1710 PRINT "YOU WON A BRONZE MEDAL" 1720 LET B(1)=B(1)+1 1730 GOTO 740 1740 PRINT "THANKS FOR THE RACE" 1750 IF G(1)<1 THEN 1770 1760 PRINT "GOLD MEDALS:";G(1) 1770 IF S(1)<1 THEN 1790 1780 PRINT "SILVER MEDALS:";S(1) 1790 IF B(1)<1 THEN 1830 1800 PRINT "BRONZE MEDALS:";B(1) 1810 DATA 14,18,26,29,18,25,28,32,29,20,29,29,25,21,26,29,20,21,20 1820 DATA 18,26,25,33,31,22 1830 END 10 PRINT TAB(30);"SLOTS" 20 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 30 PRINT: PRINT: PRINT 100 REM PRODUCED BY FRED MIRABELLE AND BOB HARPER ON JAN 29, 1973 110 REM IT SIMULATES THE SLOT MACHINE. 120 PRINT "YOU ARE IN THE H&M CASINO,IN FRONT OF ONE OF OUR" 130 PRINT "ONE-ARM BANDITS. BET FROM $1 TO $100." 140 PRINT "TO PULL THE ARM, PUNCH THE RETURN KEY AFTER MAKING YOUR BET." 150 LET P=0 160 PRINT: PRINT"YOUR BET"; 170 INPUT M 180 IF M>100 THEN 860 190 IF M<1 THEN 880 200 M=INT(M) 210 GOSUB 1270 220 PRINT 230 LET X=INT(6*RND(1)+1) 240 LET Y=INT(6*RND(1)+1) 250 LET Z=INT(6*RND(1)+1) 260 PRINT 270 IF X=1 THEN 910 280 IF X=2 THEN 930 290 IF X=3 THEN 950 300 IF X=4 THEN 970 310 IF X=5 THEN 990 320 IF X=6 THEN 1010 330 IF Y=1 THEN 1030 340 IF Y=2 THEN 1050 350 IF Y=3 THEN 1070 360 IF Y=4 THEN 1090 370 IF Y=5 THEN 1110 380 IF Y=6 THEN 1130 390 IF Z=1 THEN 1150 400 IF Z=2 THEN 1170 410 IF Z=3 THEN 1190 420 IF Z=4 THEN 1210 430 IF Z=5 THEN 1230 440 IF Z=6 THEN 1250 450 IF X=Y THEN 600 460 IF X=Z THEN 630 470 IF Y=Z THEN 650 480 PRINT 490 PRINT "YOU LOST." 500 LET P=P-M 510 PRINT "YOUR STANDINGS ARE $"P 520 PRINT "AGAIN"; 530 INPUT A$ 540 IF A$="Y" THEN 160 550 PRINT 560 IF P<0 THEN 670 570 IF P=0 THEN 690 580 IF P>0 THEN 710 590 GOTO 1350 600 IF Y=Z THEN 730 610 IF Y=1 THEN 820 620 GOTO 1341 630 IF Z=1 THEN 820 640 GOTO 470 650 IF Z=1 THEN 820 660 GOTO 1341 670 PRINT "PAY UP! PLEASE LEAVE YOUR MONEY ON THE TERMINAL." 680 GOTO 1350 690 PRINT"HEY, YOU BROKE EVEN." 700 GOTO 1350 710 PRINT "COLLECT YOUR WINNINGS FROM THE H&M CASHIER." 720 GOTO 1350 730 IF Z=1 THEN 780 740 PRINT: PRINT"**TOP DOLLAR**" 750 PRINT "YOU WON!" 760 P=(((10*M)+M)+P) 770 GOTO 510 780 PRINT:PRINT"***JACKPOT***" 790 PRINT "YOU WON!" 800 P=(((100*M)+M)+P) 810 GOTO 510 820 PRINT:PRINT"*DOUBLE BAR*" 830 PRINT"YOU WON!" 840 P=(((5*M)+M)+P) 850 GOTO 510 860 PRINT"HOUSE LIMITS ARE $100" 870 GOTO 160 880 PRINT"MINIMUM BET IS $1" 890 GOTO 160 900 GOTO 220 910 PRINT"BAR";:GOSUB 1310 920 GOTO 330 930 PRINT"BELL";:GOSUB 1310 940 GOTO 330 950 PRINT"ORANGE";:GOSUB 1310 960 GOTO 330 970 PRINT"LEMON";:GOSUB 1310 980 GOTO 330 990 PRINT"PLUM";:GOSUB 1310 1000 GOTO 330 1010 PRINT"CHERRY";:GOSUB 1310 1020 GOTO 330 1030 PRINT" BAR";:GOSUB 1310 1040 GOTO 390 1050 PRINT" BELL";:GOSUB 1310 1060 GOTO 390 1070 PRINT" ORANGE";:GOSUB 1310 1080 GOTO 390 1090 PRINT" LEMON";:GOSUB 1310 1100 GOTO 390 1110 PRINT" PLUM";:GOSUB 1310 1120 GOTO 390 1130 PRINT" CHERRY";:GOSUB 1310 1140 GOTO 390 1150 PRINT" BAR" 1160 GOTO 450 1170 PRINT" BELL" 1180 GOTO 450 1190 PRINT" ORANGE" 1200 GOTO 450 1210 PRINT" LEMON" 1220 GOTO 450 1230 PRINT" PLUM" 1240 GOTO 450 1250 PRINT" CHERRY" 1260 GOTO 450 1270 FOR Q4=1 TO 10 1280 PRINT CHR$(7); 1290 NEXT Q4 1300 RETURN 1310 FOR T8=1 TO 5 1320 PRINT CHR$(7); 1330 NEXT T8 1340 RETURN 1341 PRINT: PRINT "DOUBLE!!" 1342 PRINT"YOU WON!" 1343 P=(((2*M)+M)+P) 1344 GOTO 510 1350 STOP 9999 END 10 PRINT TAB(33);"SPLAT" 20 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 40 PRINT:PRINT:PRINT 50 DIM A(42) 95 PRINT "WELCOME TO 'SPLAT' -- THE GAME THAT SIMULATES A PARACHUTE" 96 PRINT "JUMP. TRY TO OPEN YOUR CHUTE AT THE LAST POSSIBLE" 97 PRINT "MOMENT WITHOUT GOING SPLAT." 118 PRINT:PRINT:D1=0:V=0:A=0:N=0:M=0:D1=INT(9001*RND(1)+1000) 119 PRINT "SELECT YOUR OWN TERMINAL VELOCITY (YES OR NO)";:INPUT A1$ 120 IF A1$="NO" THEN 128 121 IF A1$<>"YES" THEN PRINT "YES OR NO";:INPUT A1$:GOTO 120 123 PRINT "WHAT TERMINAL VELOCITY (MI/HR)";:INPUT V1 125 V1=V1*(5280/3600):V=V1+((V1*RND(1))/20)-((V1*RND(1))/20):GOTO 135 128 V1=INT(1000*RND(1)) 130 PRINT "OK. TERMINAL VELOCITY ="V1"MI/HR" 131 V1=V1*(5280/3600):V=V1+((V1*RND(1))/20)-((V1*RND(1))/20) 135 PRINT "WANT TO SELECT ACCELERATION DUE TO GRAVITY (YES OR NO)"; 136 INPUT B1$ 140 IF B1$="NO" THEN 150 141 IF B1$<>"YES" THEN PRINT "YES OR NO";:INPUT B1$:GOTO 140 143 PRINT "WHAT ACCELERATION (FT/SEC/SEC)";:INPUT A2 145 A=A2+((A2*RND(1))/20)-((A2*RND(1))/20):GOTO 205 150 ON INT(1+(10*RND(1)))GOTO 151,152,153,154,155,156,157,158,159,160 151 PRINT"FINE. YOU'RE ON MERCURY. ACCELERATION=12.2 FT/SEC/SEC.":GOTO 161 152 PRINT"ALL RIGHT. YOU'RE ON VENUS. ACCELERATION=28.3 FT/SEC/SEC.":GOTO 162 153 PRINT "THEN YOU'RE ON EARTH. ACCELERATION=32.16 FT/SEC/SEC.":GOTO 163 154 PRINT"FINE. YOU'RE ON THE MOON. ACCELERATION=5.15 FT/SEC/SEC.":GOTO 164 155 PRINT"ALL RIGHT. YOU'RE ON MARS. ACCELERATION=12.5 FT/SEC/SEC.":GOTO 165 156 PRINT"THEN YOU'RE ON JUPITER. ACCELERATION=85.2 FT/SEC/SEC.":GOTO 166 157 PRINT"FINE. YOU'RE ON SATURN. ACCELERATION=37.6 FT/SEC/SEC.":GOTO 167 158 PRINT"ALL RIGHT. YOU'RE ON URANUS. ACCELERATION=33.8 FT/SEC/SEC.":GOTO 168 159 PRINT"THEN YOU'RE ON NEPTUNE. ACCELERATION=39.6 FT/SEC/SEC.":GOTO 169 160 PRINT"FINE. YOU'RE ON THE SUN. ACCELERATION=896 FT/SEC/SEC.":GOTO 170 161 A2=12.2:GOTO 145 162 A2=28.3:GOTO 145 163 A2=32.16:GOTO 145 164 A2=5.15:GOTO 145 165 A2=12.5:GOTO 145 166 A2=85.2:GOTO 145 167 A2=37.6:GOTO 145 168 A2=33.8 :GOTO 145 169 A2=39.6:GOTO 145 170 A2=896:GOTO 145 205 PRINT 206 PRINT " ALTITUDE ="D1"FT" 207 PRINT " TERM. VELOCITY ="V1"FT/SEC +/-5%" 208 PRINT " ACCELERATION ="A2"FT/SEC/SEC +/-5%" 210 PRINT "SET THE TIMER FOR YOUR FREEFALL." 211 PRINT "HOW MANY SECONDS";:INPUT T 215 PRINT "HERE WE GO." 217 PRINT 218 PRINT "TIME (SEC)","DIST TO FALL (FT)" 219 PRINT "==========","=================" 300 FOR I=0 TO T STEP (T/8) 310 IF I>V/A THEN 400 320 D=D1-((A/2)*I^2) 330 IF D<=0 THEN 1000 340 PRINT I,D 350 NEXT I 360 GOTO 500 400 PRINT "TERMINAL VELOCITY REACHED AT T PLUS"V/A"SECONDS." 405 FOR I=I TO T STEP (T/8) 410 D=D1-((V^2/(2*A))+(V*(I-(V/A)))) 420 IF D<=0 THEN 1010 430 PRINT I,D 440 NEXT I 500 PRINT "CHUTE OPEN" 510 K=0:K1=0 550 FOR J=0 TO 42 555 IF A(J)=0 THEN 620 560 K=K+1 570 IF D>=A(J) THEN 600 580 K1=K1+1 600 NEXT J 610 GOTO 540 620 A(J)=D 630 IF J>2 THEN 650 635 PRINT "AMAZING!!! NOT BAD FOR YOUR "; 636 IF J=0 THEN PRINT "1ST "; 637 IF J=1 THEN PRINT "2ND "; 638 IF J=2 THEN PRINT "3RD "; 639 PRINT "SUCCESSFUL JUMP!!!":GOTO 2000 650 IF K-K1<=.1*K THEN 700 660 IF K-K1<=.25*K THEN 710 670 IF K-K1<=.5*K THEN 720 680 IF K-K1<=.75*K THEN 730 690 IF K-K1<=.9*K THEN 740 695 GOTO 750 700 PRINT "WOW! THAT'S SOME JUMPING. OF THE"K"SUCCESSFUL JUMPS" 701 PRINT "BEFORE YOURS, ONLY"K-K1"OPENED THEIR CHUTES LOWER THAN" 702 PRINT "YOU DID." 703 GOTO 2000 710 PRINT "PRETTY GOOD! " K"SUCCESSFUL JUMPS PRECEDED YOURS AND ONLY" 711 PRINT K-K1" OF THEM GOT LOWER THAN YOU DID BEFORE THEIR CHUTES" 712 PRINT "OPENED." :GOTO 2000 720 PRINT "NOT BAD. THERE HAVE BEEN"K"SUCCESSFUL JUMPS BEFORE YOURS." 721 PRINT"YOU WERE BEATEN OUT BY"K-K1"OF THEM.":GOTO 2000 730 PRINT "CONSERVATIVE, AREN'T YOU? YOU RANKED ONLY"K-K1"IN THE" 731 PRINT K"SUCCESSFUL JUMPS BEFORE YOURS.":GOTO 2000 740 PRINT "HUMPH! DON'T YOU HAVE ANY SPORTING BLOOD? THERE WERE" 741 PRINT K"SUCCESSFUL JUMPS BEFORE YOURS AND YOU CAME IN"K1"JUMPS" 742 PRINT "BETTER THAN THE WORST. SHAPE UP!!!":GOTO 2000 750 PRINT "HEY! YOU PULLED THE RIP CORD MUCH TOO SOON. "K"SUCCESSFUL" 751 PRINT "JUMPS BEFORE YOURS AND YOU CAME IN NUMBER"K-K1"! GET WITH IT!" 752 GOTO 2000 800 PRINT "REQUIESCAT IN PACE.":GOTO 1950 801 PRINT "MAY THE ANGEL OF HEAVEN LEAD YOU INTO PARADISE.":GOTO 1950 802 PRINT "REST IN PEACE.":GOTO 1950 803 PRINT "SON-OF-A-GUN.":GOTO 1950 804 PRINT "#$%&&%!$":GOTO 1950 805 PRINT "A KICK IN THE PANTS IS A BOOST IF YOU'RE HEADED RIGHT.":GOTO 1950 806 PRINT "HMMM. SHOULD HAVE PICKED A SHORTER TIME.":GOTO 1950 807 PRINT "MUTTER. MUTTER. MUTTER.":GOTO 1950 808 PRINT "PUSHING UP DAISIES.":GOTO 1950 809 PRINT "EASY COME, EASY GO.":GOTO 1950 1000 PRINT SQR(2*D1/A),"SPLAT" 1005 ON INT(1+(10*RND(1)))GOTO 800,801,802,803,804,805,806,807,808,809 1010 PRINT (V/A)+((D1-(V^2/(2*A)))/V),"SPLAT" 1020 GOTO 1005 1950 PRINT "I'LL GIVE YOU ANOTHER CHANCE.":GOTO 2000 2000 PRINT "DO YOU WANT TO PLAY AGAIN";:INPUT Z$ 2001 IF Z$="YES" THEN 118 2002 IF Z$="NO" THEN 2005 2003 PRINT "YES OR NO":GOTO 2000 2005 PRINT "PLEASE";:INPUT Z$:IF Z$="YES" THEN 118 2006 IF Z$<>"NO" THEN PRINT "YES OR NO ";:GOTO 2005 2007 PRINT "SSSSSSSSSS.":PRINT:GOTO 2046 2046 END 10 PRINT TAB(34);"STARS" 20 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 30 PRINT:PRINT:PRINT 100 REM *** STARS - PEOPLE'S COMPUTER CENTER, MENLO PARK, CA 140 REM *** A IS LIMIT ON NUMBER, M IS NUMBER OF GUESSES 150 A=100:M=7 170 INPUT "DO YOU WANT INSTRUCTIONS";A$ 190 IF LEFT$(A$,1)="N" THEN 280 200 REM *** INSTRUCTIONS ON HOW TO PLAY 210 PRINT "I AM THINKING OF A WHOLE NUMBER FROM 1 TO";A 220 PRINT "TRY TO GUESS MY NUMBER. AFTER YOU GUESS, I" 230 PRINT "WILL TYPE ONE OR MORE STARS (*). THE MORE" 240 PRINT "STARS I TYPE, THE CLOSER YOU ARE TO MY NUMBER." 250 PRINT "ONE STAR (*) MEANS FAR AWAY, SEVEN STARS (*******)" 260 PRINT "MEANS REALLY CLOSE! YOU GET";M;"GUESSES." 270 REM *** COMPUTER THINKS OF A NUMBER 280 PRINT 290 PRINT 300 X=INT(A*RND(1)+1) 310 PRINT "OK, I AM THINKING OF A NUMBER, START GUESSING." 320 REM *** GUESSING BEGINS, HUMAN GETS M GUESSES 330 FOR K=1 TO M 340 PRINT 350 PRINT "YOUR GUESS"; 360 INPUT G 370 IF G=X THEN 600 380 D=ABS(G-X) 390 IF D>=64 THEN 510 400 IF D>=32 THEN 500 410 IF D>=16 THEN 490 420 IF D>=8 THEN 480 430 IF D>=4 THEN 470 440 IF D>=2 THEN 460 450 PRINT "*"; 460 PRINT "*"; 470 PRINT "*"; 480 PRINT "*"; 490 PRINT "*"; 500 PRINT "*"; 510 PRINT "*"; 520 PRINT 530 NEXT K 540 REM *** DID NOT GUESS IN M GUESSES 550 PRINT 560 PRINT "SORRY, THAT'S";M;"GUESSES. THE NUMBER WAS";X 580 GOTO 650 590 REM *** WE HAVE A WINNER 600 PRINT:FOR N=1 TO 79 610 PRINT "*"; 620 NEXT N 630 PRINT:PRINT 640 PRINT "YOU GOT IT IN";K;"GUESSES!!! LET'S PLAY AGAIN..." 650 GOTO 280 660 END 10 PRINT TAB(30);"STOCK MARKET" 20 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 30 PRINT: PRINT: PRINT 100 REM STOCK MARKET SIMULATION -STOCK- 101 REM REVISED 8/18/70 (D. PESSEL, L. BRAUN, C. LOSIK) 102 REM IMP VRBLS: A-MRKT TRND SLP; B5-BRKRGE FEE; C-TTL CSH ASSTS; 103 REM C5-TTL CSH ASSTS (TEMP); C(I)-CHNG IN STK VAL; D-TTL ASSTS; 104 REM E1,E2-LRG CHNG MISC; I-STCK #; I1,I2-STCKS W LRG CHNG; 105 REM N1,N2-LRG CHNG DAY CNTS; P5-TTL DAYS PRCHSS; P(I)-PRTFL CNTNTS; 106 REM Q9-NEW CYCL?; S4-SGN OF A; S5-TTL DYS SLS; S(I)-VALUE/SHR; 107 REM T-TTL STCK ASSTS; T5-TTL VAL OF TRNSCTNS; 108 REM W3-LRG CHNG; X1-SMLL CHNG(<$1); Z4,Z5,Z6-NYSE AVE.; Z(I)-TRNSCT 110 DIM S(5),P(5),Z(5),C(5) 112 REM SLOPE OF MARKET TREND:A (SAME FOR ALL STOCKS) 113 LET X=1 114 LET A=INT((RND(X)/10)*100+.5)/100 115 LET T5=0 116 LET X9=0 117 LET N1=0 118 LET N2=0 119 LET E1=0 120 LET E2=0 121 REM INTRODUCTION 122 PRINT "DO YOU WANT THE INSTRUCTIONS (YES-TYPE 1, NO-TYPE 0)"; 123 INPUT Z9 124 PRINT 125 PRINT 126 IF Z9<1 THEN 200 130 PRINT "THIS PROGRAM PLAYS THE STOCK MARKET. YOU WILL BE GIVEN" 132 PRINT "$10,000 AND MAY BUY OR SELL STOCKS. THE STOCK PRICES WILL" 134 PRINT "BE GENERATED RANDOMLY AND THEREFORE THIS MODEL DOES NOT" 135 PRINT "REPRESENT EXACTLY WHAT HAPPENS ON THE EXCHANGE. A TABLE" 136 PRINT "OF AVAILABLE STOCKS, THEIR PRICES, AND THE NUMBER OF SHARES" 137 PRINT "IN YOUR PORTFOLIO WILL BE PRINTED. FOLLOWING THIS, THE" 138 PRINT "INITIALS OF EACH STOCK WILL BE PRINTED WITH A QUESTION" 139 PRINT "MARK. HERE YOU INDICATE A TRANSACTION. TO BUY A STOCK" 140 PRINT "TYPE +NNN, TO SELL A STOCK TYPE -NNN, WHERE NNN IS THE" 141 PRINT "NUMBER OF SHARES. A BROKERAGE FEE OF 1% WILL BE CHARGED" 142 PRINT "ON ALL TRANSACTIONS. NOTE THAT IF A STOCK'S VALUE DROPS" 143 PRINT "TO ZERO IT MAY REBOUND TO A POSITIVE VALUE AGAIN. YOU" 144 PRINT "HAVE $10,000 TO INVEST. USE INTEGERS FOR ALL YOUR INPUTS." 145 PRINT "(NOTE: TO GET A 'FEEL' FOR THE MARKET RUN FOR AT LEAST" 146 PRINT "10 DAYS)" 147 PRINT "-----GOOD LUCK!-----" 200 REM GENERATION OF STOCK TABLE; INPUT REQUESTS 210 REM INITIAL STOCK VALUES 220 LET S(1)=100 230 LET S(2)=85 240 LET S(3)=150 250 LET S(4)=140 260 LET S(5)=110 265 REM INITIAL T8 - # DAYS FOR FIRST TREND SLOPE (A) 266 LET T8=INT(4.99*RND(X)+1) 267 REM RANDOMIZE SIGN OF FIRST TREND SLOPE (A) 268 IF RND(X)>.5 THEN 270 269 LET A=-A 270 REM RANDOMIZE INITIAL VALUES 280 GOSUB 830 285 REM INITIAL PORTFOLIO CONTENTS 290 FOR I=1 TO 5 300 LET P(I)=0 305 LET Z(I)=0 310 NEXT I 320 PRINT 330 PRINT 333 REM INITIALIZE CASH ASSETS:C 335 LET C=10000 338 REM PRINT INITIAL PORTFOLIO 340 PRINT "STOCK"," ","INITIALS","PRICE/SHARE" 350 PRINT "INT. BALLISTIC MISSILES"," IBM",S(1) 352 PRINT "RED CROSS OF AMERICA"," RCA",S(2) 354 PRINT "LICHTENSTEIN, BUMRAP & JOKE"," LBJ",S(3) 356 PRINT "AMERICAN BANKRUPT CO."," ABC",S(4) 358 PRINT "CENSURED BOOKS STORE"," CBS",S(5) 360 PRINT 361 REM NYSE AVERAGE:Z5; TEMP. VALUE:Z4; NET CHANGE:Z6 363 LET Z4=Z5 364 LET Z5=0 365 LET T=0 370 FOR I=1 TO 5 375 LET Z5=Z5+S(I) 380 LET T=T+S(I)*P(I) 390 NEXT I 391 LET Z5=INT(100*(Z5/5)+.5)/100 392 LET Z6=INT((Z5-Z4)*100+.5)/100 393 REM TOTAL ASSETS:D 394 LET D=T+C 395 IF X9>0 THEN 398 396 PRINT "NEW YORK STOCK EXCHANGE AVERAGE: "Z5 397 GOTO 399 398 PRINT "NEW YORK STOCK EXCHANGE AVERAGE: "Z5"NET CHANGE"Z6 399 PRINT 400 LET T=INT(100*T+.5)/100 401 PRINT "TOTAL STOCK ASSETS ARE $";T 403 LET C=INT(100*C+.5)/100 405 PRINT "TOTAL CASH ASSETS ARE $";C 407 LET D=INT(100*D+.5)/100 408 PRINT "TOTAL ASSETS ARE $";D 410 PRINT 411 IF X9=0 THEN 416 412 PRINT "DO YOU WISH TO CONTINUE (YES-TYPE 1, NO-TYPE 0)"; 413 INPUT Q9 414 IF Q9<1 THEN 998 416 REM INPUT TRANSACTIONS 420 PRINT "WHAT IS YOUR TRANSACTION IN" 430 PRINT "IBM"; 440 INPUT Z(1) 450 PRINT "RCA"; 460 INPUT Z(2) 470 PRINT "LBJ"; 480 INPUT Z(3) 490 PRINT "ABC"; 500 INPUT Z(4) 510 PRINT "CBS"; 520 INPUT Z(5) 525 PRINT 530 REM TOTAL DAY'S PURCHASES IN $:P5 540 LET P5=0 550 REM TOTAL DAY'S SALES IN $:S5 560 LET S5=0 570 FOR I=1 TO 5 575 LET Z(I)=INT(Z(I)+.5) 580 IF Z(I)<=0 THEN 610 590 LET P5=P5+Z(I)*S(I) 600 GOTO 620 610 LET S5=S5-Z(I)*S(I) 612 IF -Z(I)<=P(I) THEN 620 614 PRINT "YOU HAVE OVERSOLD A STOCK; TRY AGAIN." 616 GOTO 420 620 NEXT I 622 REM TOTAL VALUE OF TRANSACTIONS:T5 625 LET T5=P5+S5 630 REM BROKERAGE FEE:B5 640 LET B5=INT(.01*T5*100+.5)/100 650 REM CASH ASSETS=OLD CASH ASSETS-TOTAL PURCHASES 652 REM -BROKERAGE FEES+TOTAL SALES:C5 654 LET C5=C-P5-B5+S5 656 IF C5>=0 THEN 674 658 PRINT "YOU HAVE USED $"-C5" MORE THAN YOU HAVE." 660 GOTO 420 674 LET C=C5 675 REM CALCULATE NEW PORTFOLIO 680 FOR I=1 TO 5 690 LET P(I)=P(I)+Z(I) 700 NEXT I 710 REM CALCULATE NEW STOCK VALUES 720 GOSUB 830 750 REM PRINT PORTFOLIO 751 REM BELL RINGING-DIFFERENT ON MANY COMPUTERS 755 PRINT 756 PRINT "********** END OF DAY'S TRADING **********" 757 PRINT 758 PRINT 759 IF X9<1 THEN 769 769 PRINT "STOCK","PRICE/SHARE","HOLDINGS", "VALUE", "NET PRICE CHANGE" 770 PRINT "IBM", S(1), P(1), S(1)*P(1), C(1) 771 PRINT "RCA", S(2), P(2), S(2)*P(2), C(2) 772 PRINT "LBJ", S(3), P(3), S(3)*P(3), C(3) 773 PRINT "ABC", S(4), P(4), S(4)*P(4), C(4) 774 PRINT "CBS", S(5), P(5), S(5)*P(5), C(5) 775 LET X9=1 780 PRINT 790 PRINT 810 GOTO 360 829 REM NEW STOCK VALUES - SUBROUTINE 830 REM RANDOMLY PRODUCE NEW STOCK VALUES BASED ON PREVIOUS 831 REM DAY'S VALUES 832 REM N1,N2 ARE RANDOM NUMBERS OF DAYS WHICH RESPECTIVELY 833 REM DETERMINE WHEN STOCK I1 WILL INCREASE 10 PTS. AND STOCK 834 REM I2 WILL DECREASE 10 PTS. 840 REM IF N1 DAYS HAVE PASSED, PICK AN I1, SET E1, DETERMINE NEW N1 841 IF N1>0 THEN 850 845 LET I1=INT(4.99*RND(X)+1) 846 LET N1=INT(4.99*RND(X)+1) 847 LET E1=1 850 REM IF N2 DAYS HAVE PASSED, PICK AN I2, SET E2, DETERMINE NEW N2 851 IF N2>0 THEN 860 855 LET I2=INT(4.99*RND(X)+1) 856 LET N2=INT(4.99*RND(X)+1) 857 LET E2=1 860 REM DEDUCT ONE DAY FROM N1 AND N2 861 LET N1=N1-1 862 LET N2=N2-1 890 REM LOOP THROUGH ALL STOCKS 900 FOR I=1 TO 5 910 LET X1=RND(X) 915 IF X1>.25 THEN 920 916 LET X1=.25 917 GOTO 935 920 IF X1>.5 THEN 925 921 LET X1=.5 922 GOTO 935 925 IF X1>.75 THEN 930 926 LET X1=.75 927 GOTO 935 930 LET X1=0.0 931 REM BIG CHANGE CONSTANT:W3 (SET TO ZERO INITIALLY) 935 LET W3=0 936 IF E1<1 THEN 945 937 IF INT(I1+.5)<>INT(I+.5) THEN 945 938 REM ADD 10 PTS. TO THIS STOCK; RESET E1 939 LET W3=10 943 LET E1=0 945 IF E2<1 THEN 955 947 IF INT(I2+.5)<>INT(I+.5) THEN 955 948 REM SUBTRACT 10 PTS. FROM THIS STOCK; RESET E2 949 LET W3=W3-10 953 LET E2=0 954 REM C(I) IS CHANGE IN STOCK VALUE 955 LET C(I)=INT(A*S(I))+X1+INT(3-6*RND(X)+.5)+W3 956 LET C(I)=INT(100*C(I)+.5)/100 957 LET S(I)=S(I)+C(I) 960 IF S(I)>0 THEN 967 964 LET C(I)=0 965 LET S(I)=0 966 GOTO 970 967 LET S(I)=INT(100*S(I)+.5)/100 970 NEXT I 972 REM AFTER T8 DAYS RANDOMLY CHANGE TREND SIGN AND SLOPE 973 LET T8=T8-1 974 IF T8<1 THEN 985 980 RETURN 985 REM RANDOMLY CHANGE TREND SIGN AND SLOPE (A), AND DURATION 986 REM OF TREND (T8) 990 LET T8=INT(4.99*RND(X)+1) 992 LET A=INT((RND(X)/10)*100+.5)/100 993 LET S4=RND(X) 994 IF S4<=.5 THEN 997 995 LET A=-A 997 RETURN 998 PRINT "HOPE YOU HAD FUN!!" 999 END if 1 then print "hi": print "lo" if 1 then print "this": print "that" else print "what ?" if 0 then print "help": print "yours" else print "mine" if 1 then print "blue" else print "yellow": print "orange" if 0 then print "brown" else print "fucia": print "azure" if 1 then print "bark": print "mark" else print "zark": print "flark" endif if 0 then print "whoops": print "whapps" else print "paps": print "maps" endif if 1 then print "this is 1" print "this is 2" endif if 1 then print "this is 3" print "this is 4" else print "this is 5" print "this is 6" endif if 0 then print "this is 7" print "this is 8" else print "this is 9" print "this is 10" endif if 1 then print "yes" if 3 then print "no" else print "why" endif else print "no no" if 0 then print "who" else print "what" endif endif if 1 then print "wild" else if 2 then print "bite" else print "camping" if 1 then print "carp": if 1 then print "bat": if 1 then print "steelhead" endif if 1 then print "adder" else print "whatchacallit" print "smack" endif if 0 then print "last" else print "yep" print "howsit" endif select 1 case 1: print "one" case 2: print "two" case 3: print "three" other: print "something" endsel select 2 case 1: print "one" case 2: print "two" case 3: print "three" other: print "something" endsel select 3 case 1: print "one" case 2: print "two" case 3: print "three" other: print "something" endsel select 4 case 1: print "one" case 2: print "two" case 3: print "three" other: print "something" endsel select 234 case 1: print "one" case 2: print "two" case 3: print "three" other: print "something" endsel select 10 case 1: print "one" case 2: print "two" case 3: print "three" endsel print "and after" select "fork" case "knife": print "its a knife" case "spoon": print "its a spoon" case "fork": print "its a fork" other: print "don't know what it is" endsel select 1.2 case 1.1: print "point 1" case 1.2: print "point 2" case 1.3: print "point 3" endsel select 1: case 1: print "one": case 2: print "two": case 3: print "three" endsel 10 REM SUPER STARTREK - MAY 16,1978 - REQUIRES 24K MEMORY 30 REM 40 REM **** **** STAR TREK **** **** 50 REM **** SIMULATION OF A MISSION OF THE STARSHIP ENTERPRISE, 60 REM **** AS SEEN ON THE STAR TREK TV SHOW. 70 REM **** ORIGIONAL PROGRAM BY MIKE MAYFIELD, MODIFIED VERSION 80 REM **** PUBLISHED IN DEC'S "101 BASIC GAMES", BY DAVE AHL. 90 REM **** MODIFICATIONS TO THE LATTER (PLUS DEBUGGING) BY BOB 100 REM *** LEEDOM - APRIL & DECEMBER 1974, 110 REM *** WITH A LITTLE HELP FROM HIS FRIENDS . . . 120 REM *** COMMENTS, EPITHETS, AND SUGGESTIONS SOLICITED -- 130 REM *** SEND TO: R. C. LEEDOM 140 REM *** WESTINGHOUSE DEFENSE & ELECTRONICS SYSTEMS CNTR. 150 REM *** BOX 746, M.S. 338 160 REM *** BALTIMORE, MD 21203 170 REM *** 180 REM *** CONVERTED TO MICROSOFT 8 K BASIC 3/16/78 BY JOHN GORDERS 190 REM *** LINE NUMBERS FROM VERSION STREK7 OF 1/12/75 PRESERVED AS 200 REM *** MUCH AS POSSIBLE WHILE USING MULTIPLE STATEMENTS PER LINE 205 REM *** SOME LINES ARE LONGER THAN 72 CHARACTERS; THIS WAS DONE 210 REM *** BY USING "?" INSTEAD OF "PRINT" WHEN ENTERING LINES 215 REM *** 220 PRINT:PRINT:PRINT:PRINT:PRINT:PRINT:PRINT:PRINT:PRINT:PRINT:PRINT 221 PRINT" ,------*------," 222 PRINT" ,------------- '--- ------'" 223 PRINT" '-------- --' / /" 224 PRINT" ,---' '-------/ /--," 225 PRINT" '----------------'":PRINT 226 PRINT" THE USS ENTERPRISE --- NCC-1701" 227 PRINT:PRINT:PRINT:PRINT:PRINT 260 REM CLEAR 600 270 Z$=" " 330 DIM G(8,8),C(9,2),K(3,3),N(3),Z(8,8),D(8) 370 T=INT(RND(1)*20+20)*100:T0=T:T9=25+INT(RND(1)*10):D0=0:E=3000:E0=E 440 P=10:P0=P:S9=200:S=0:B9=2:K9=0:X$="":X0$=" IS " 470 DEF FND(D)=SQR((K(I,1)-S1)^2+(K(I,2)-S2)^2) 475 DEF FNR(R)=INT(RND(R)*7.98+1.01) 480 REM INITIALIZE ENTERPRIZE'S POSITION 490 Q1=FNR(1):Q2=FNR(1):S1=FNR(1):S2=FNR(1) 530 FORI=1TO9:C(I,1)=0:C(I,2)=0:NEXTI 540 C(3,1)=-1:C(2,1)=-1:C(4,1)=-1:C(4,2)=-1:C(5,2)=-1:C(6,2)=-1 600 C(1,2)=1:C(2,2)=1:C(6,1)=1:C(7,1)=1:C(8,1)=1:C(8,2)=1:C(9,2)=1 670 FORI=1TO8:D(I)=0:NEXTI 710 A1$="NAVSRSLRSPHATORSHEDAMCOMXXX" 810 REM SETUP WHAT EXHISTS IN GALAXY . . . 815 REM K3= # KLINGONS B3= # STARBASES S3 = # STARS 820 FORI=1TO8:FORJ=1TO8:K3=0:Z(I,J)=0:R1=RND(1) 850 IFR1>.98THENK3=3:K9=K9+3:GOTO980 860 IFR1>.95THENK3=2:K9=K9+2:GOTO980 870 IFR1>.80THENK3=1:K9=K9+1 980 B3=0:IFRND(1)>.96THENB3=1:B9=B9+1 1040 G(I,J)=K3*100+B3*10+FNR(1):NEXTJ:NEXTI:IFK9>T9THENT9=K9+1 1100 IFB9<>0THEN1200 1150 IFG(Q1,Q2)<200THENG(Q1,Q2)=G(Q1,Q2)+120:K9=K9+1 1160 B9=1:G(Q1,Q2)=G(Q1,Q2)+10:Q1=FNR(1):Q2=FNR(1) 1200 K7=K9:IFB9<>1THENX$="S":X0$=" ARE " 1230 PRINT"YOUR ORDERS ARE AS FOLLOWS:" 1240 PRINT" DESTROY THE";K9;"KLINGON WARSHIPS WHICH HAVE INVADED" 1252 PRINT" THE GALAXY BEFORE THEY CAN ATTACK FEDERATION HEADQUARTERS" 1260 PRINT" ON STARDATE";T0+T9;" THIS GIVES YOU";T9;"DAYS. THERE";X0$ 1272 PRINT" ";B9;"STARBASE";X$;" IN THE GALAXY FOR RESUPPLYING YOUR SHIP" 1280 PRINT:REM PRINT"HIT ANY KEY EXCEPT RETURN WHEN READY TO ACCEPT COMMAND" 1300 I=RND(1):REM IF INP(1)=13 THEN 1300 1310 REM HERE ANY TIME NEW QUADRANT ENTERED 1320 Z4=Q1:Z5=Q2:K3=0:B3=0:S3=0:G5=0:D4=.5*RND(1):Z(Q1,Q2)=G(Q1,Q2) 1390 IFQ1<1ORQ1>8ORQ2<1ORQ2>8THEN1600 1430 GOSUB 9030:PRINT:IF T0<>T THEN 1490 1460 PRINT"YOUR MISSION BEGINS WITH YOUR STARSHIP LOCATED" 1470 PRINT"IN THE GALACTIC QUADRANT, '";G2$;"'.":GOTO 1500 1490 PRINT"NOW ENTERING ";G2$;" QUADRANT . . ." 1500 PRINT:K3=INT(G(Q1,Q2)*.01):B3=INT(G(Q1,Q2)*.1)-10*K3 1540 S3=G(Q1,Q2)-100*K3-10*B3:IFK3=0THEN1590 1560 PRINT"COMBAT AREA CONDITION RED":IFS>200THEN1590 1580 PRINT" SHIELDS DANGEROUSLY LOW" 1590 FORI=1TO3:K(I,1)=0:K(I,2)=0:NEXTI 1600 FORI=1TO3:K(I,3)=0:NEXTI:Q$=Z$+Z$+Z$+Z$+Z$+Z$+Z$+LEFT$(Z$,17) 1660 REM POSITION ENTERPRISE IN QUADRANT, THEN PLACE "K3" KLINGONS, & 1670 REM "B3" STARBASES, & "S3" STARS ELSEWHERE. 1680 A$="<*>":Z1=S1:Z2=S2:GOSUB8670:IFK3<1THEN1820 1720 FORI=1TOK3:GOSUB8590:A$="+K+":Z1=R1:Z2=R2 1780 GOSUB8670:K(I,1)=R1:K(I,2)=R2:K(I,3)=S9*(0.5+RND(1)):NEXTI 1820 IFB3<1THEN1910 1880 GOSUB8590:A$=">!<":Z1=R1:B4=R1:Z2=R2:B5=R2:GOSUB8670 1910 FORI=1TOS3:GOSUB8590:A$=" * ":Z1=R1:Z2=R2:GOSUB8670:NEXTI 1980 GOSUB6430 1990 IFS+E>10THENIFE>10ORD(7)=0THEN2060 2020 PRINT:PRINT"** FATAL ERROR ** YOU'VE JUST STRANDED YOUR SHIP IN " 2030 PRINT"SPACE":PRINT"YOU HAVE INSUFFICIENT MANEUVERING ENERGY,"; 2040 PRINT" AND SHIELD CONTROL":PRINT"IS PRESENTLY INCAPABLE OF CROSS"; 2050 PRINT"-CIRCUITING TO ENGINE ROOM!!":GOTO6220 2060 INPUT"COMMAND";A$ 2080 FORI=1TO9:IFLEFT$(A$,3)<>MID$(A1$,3*I-2,3)THEN2160 2140 ONIGOTO2300,1980,4000,4260,4700,5530,5690,7290,6270 2160 NEXTI:PRINT"ENTER ONE OF THE FOLLOWING:" 2180 PRINT" NAV (TO SET COURSE)" 2190 PRINT" SRS (FOR SHORT RANGE SENSOR SCAN)" 2200 PRINT" LRS (FOR LONG RANGE SENSOR SCAN)" 2210 PRINT" PHA (TO FIRE PHASERS)" 2220 PRINT" TOR (TO FIRE PHOTON TORPEDOES)" 2230 PRINT" SHE (TO RAISE OR LOWER SHIELDS)" 2240 PRINT" DAM (FOR DAMAGE CONTROL REPORTS)" 2250 PRINT" COM (TO CALL ON LIBRARY-COMPUTER)" 2260 PRINT" XXX (TO RESIGN YOUR COMMAND)":PRINT:GOTO 1990 2290 REM COURSE CONTROL BEGINS HERE 2300 INPUT"COURSE (0-9)";C1:IFC1=9THENC1=1 2310 IFC1>=1ANDC1<9THEN2350 2330 PRINT" LT. SULU REPORTS, 'INCORRECT COURSE DATA, SIR!'":GOTO1990 2350 X$="8":IFD(1)<0THENX$="0.2" 2360 PRINT"WARP FACTOR (0-";X$;")";:INPUTW1:IFD(1)<0ANDW1>.2THEN2470 2380 IFW1>0ANDW1<=8THEN2490 2390 IFW1=0THEN1990 2420 PRINT" CHIEF ENGINEER SCOTT REPORTS 'THE ENGINES WON'T TAKE"; 2430 PRINT" WARP ";W1;"!'":GOTO1990 2470 PRINT"WARP ENGINES ARE DAMAGED. MAXIUM SPEED = WARP 0.2":GOTO1990 2490 N=INT(W1*8+.5):IFE-N>=0THEN2590 2500 PRINT"ENGINEERING REPORTS 'INSUFFICIENT ENERGY AVAILABLE" 2510 PRINT" FOR MANEUVERING AT WARP";W1;"!'" 2530 IFS<N-EORD(7)<0THEN1990 2550 PRINT"DEFLECTOR CONTROL ROOM ACKNOWLEDGES";S;"UNITS OF ENERGY" 2560 PRINT" PRESENTLY DEPLOYED TO SHIELDS." 2570 GOTO1990 2580 REM KLINGONS MOVE/FIRE ON MOVING STARSHIP . . . 2590 FORI=1TOK3:IFK(I,3)=0THEN2700 2610 A$=" ":Z1=K(I,1):Z2=K(I,2):GOSUB8670:GOSUB8590 2660 K(I,1)=Z1:K(I,2)=Z2:A$="+K+":GOSUB8670 2700 NEXTI:GOSUB6000:D1=0:D6=W1:IFW1>=1THEND6=1 2770 FORI=1TO8:IFD(I)>=0THEN2880 2790 D(I)=D(I)+D6:IFD(I)>-.1ANDD(I)<0THEND(I)=-.1:GOTO2880 2800 IFD(I)<0THEN2880 2810 IFD1<>1THEND1=1:PRINT"DAMAGE CONTROL REPORT: "; 2840 PRINTTAB(8);:R1=I:GOSUB8790:PRINTG2$;" REPAIR COMPLETED." 2880 NEXTI:IFRND(1)>.2THEN3070 2910 R1=FNR(1):IFRND(1)>=.6THEN3000 2930 D(R1)=D(R1)-(RND(1)*5+1):PRINT"DAMAGE CONTROL REPORT: "; 2960 GOSUB8790:PRINTG2$;" DAMAGED":PRINT:GOTO3070 3000 D(R1)=D(R1)+RND(1)*3+1:PRINT"DAMAGE CONTROL REPORT: "; 3030 GOSUB8790:PRINTG2$;" STATE OF REPAIR IMPROVED":PRINT 3060 REM BEGIN MOVING STARSHIP 3070 A$=" ":Z1=INT(S1):Z2=INT(S2):GOSUB8670 3110 X1=C(C1,1)+(C(C1+1,1)-C(C1,1))*(C1-INT(C1)):X=S1:Y=S2 3140 X2=C(C1,2)+(C(C1+1,2)-C(C1,2))*(C1-INT(C1)):Q4=Q1:Q5=Q2 3170 FORI=1TON:S1=S1+X1:S2=S2+X2:IFS1<1ORS1>=9ORS2<1ORS2>=9THEN3500 3240 S8=INT(S1)*24+INT(S2)*3-26:IFMID$(Q$,S8,2)=" "THEN3360 3320 S1=INT(S1-X1):S2=INT(S2-X2):PRINT"WARP ENGINES SHUT DOWN AT "; 3350 PRINT"SECTOR";S1;",";S2;"DUE TO BAD NAVAGATION":GOTO3370 3360 NEXTI:S1=INT(S1):S2=INT(S2) 3370 A$="<*>":Z1=INT(S1):Z2=INT(S2):GOSUB8670:GOSUB3910:T8=1 3430 IFW1<1THENT8=.1*INT(10*W1) 3450 T=T+T8:IFT>T0+T9THEN6220 3470 REM SEE IF DOCKED, THEN GET COMMAND 3480 GOTO1980 3490 REM EXCEEDED QUADRANT LIMITS 3500 X=8*Q1+X+N*X1:Y=8*Q2+Y+N*X2:Q1=INT(X/8):Q2=INT(Y/8):S1=INT(X-Q1*8) 3550 S2=INT(Y-Q2*8):IFS1=0THENQ1=Q1-1:S1=8 3590 IFS2=0THENQ2=Q2-1:S2=8 3620 X5=0:IFQ1<1THENX5=1:Q1=1:S1=1 3670 IFQ1>8THENX5=1:Q1=8:S1=8 3710 IFQ2<1THENX5=1:Q2=1:S2=1 3750 IFQ2>8THENX5=1:Q2=8:S2=8 3790 IFX5=0THEN3860 3800 PRINT"LT. UHURA REPORTS MESSAGE FROM STARFLEET COMMAND:" 3810 PRINT" 'PERMISSION TO ATTEMPT CROSSING OF GALACTIC PERIMETER" 3820 PRINT" IS HEREBY *DENIED*. SHUT DOWN YOUR ENGINES.'" 3830 PRINT"CHIEF ENGINEER SCOTT REPORTS 'WARP ENGINES SHUT DOWN" 3840 PRINT" AT SECTOR";S1;",";S2;"OF QUADRANT";Q1;",";Q2;".'" 3850 IFT>T0+T9THEN6220 3860 IF8*Q1+Q2=8*Q4+Q5THEN3370 3870 T=T+1:GOSUB3910:GOTO1320 3900 REM MANEUVER ENERGY S/R ** 3910 E=E-N-10:IFE>=0THENRETURN 3930 PRINT"SHIELD CONTROL SUPPLIES ENERGY TO COMPLETE THE MANEUVER." 3940 S=S+E:E=0:IFS<=0THENS=0 3980 RETURN 3990 REM LONG RANGE SENSOR SCAN CODE 4000 IFD(3)<0THENPRINT"LONG RANGE SENSORS ARE INOPERABLE":GOTO1990 4030 PRINT"LONG RANGE SCAN FOR QUADRANT";Q1;",";Q2 4040 O1$="-------------------":PRINTO1$ 4060 FORI=Q1-1TOQ1+1:N(1)=-1:N(2)=-2:N(3)=-3:FORJ=Q2-1TOQ2+1 4120 IFI>0ANDI<9ANDJ>0ANDJ<9THENN(J-Q2+2)=G(I,J):Z(I,J)=G(I,J) 4180 NEXTJ:FORL=1TO3:PRINT": ";:IFN(L)<0THENPRINT"*** ";:GOTO4230 4210 PRINTRIGHT$(STR$(N(L)+1000),3);" "; 4230 NEXTL:PRINT":":PRINTO1$:NEXTI:GOTO1990 4250 REM PHASER CONTROL CODE BEGINS HERE 4260 IFD(4)<0THENPRINT"PHASERS INOPERATIVE":GOTO1990 4265 IFK3>0THEN4330 4270 PRINT"SCIENCE OFFICER SPOCK REPORTS 'SENSORS SHOW NO ENEMY SHIPS" 4280 PRINT" IN THIS QUADRANT'":GOTO1990 4330 IFD(8)<0THENPRINT"COMPUTER FAILURE HAMPERS ACCURACY" 4350 PRINT"PHASERS LOCKED ON TARGET; "; 4360 PRINT"ENERGY AVAILABLE =";E;"UNITS" 4370 INPUT"NUMBER OF UNITS TO FIRE";X:IFX<=0THEN1990 4400 IFE-X<0THEN4360 4410 E=E-X:IFD(7)<0THENX=X*RND(1) 4450 H1=INT(X/K3):FORI=1TO3:IFK(I,3)<=0THEN4670 4480 H=INT((H1/FND(0))*(RND(1)+2)):IFH>.15*K(I,3)THEN4530 4500 PRINT"SENSORS SHOW NO DAMAGE TO ENEMY AT ";K(I,1);",";K(I,2):GOTO4670 4530 K(I,3)=K(I,3)-H:PRINTH;"UNIT HIT ON KLINGON AT SECTOR";K(I,1);","; 4550 PRINTK(I,2):IFK(I,3)<=0THENPRINT"*** KLINGON DESTROYED ***":GOTO4580 4560 PRINT" (SENSORS SHOW";K(I,3);"UNITS REMAINING)":GOTO4670 4580 K3=K3-1:K9=K9-1:Z1=K(I,1):Z2=K(I,2):A$=" ":GOSUB8670 4650 K(I,3)=0:G(Q1,Q2)=G(Q1,Q2)-100:Z(Q1,Q2)=G(Q1,Q2):IFK9<=0THEN6370 4670 NEXTI:GOSUB6000:GOTO1990 4690 REM PHOTON TORPEDO CODE BEGINS HERE 4700 IFP<=0THENPRINT"ALL PHOTON TORPEDOES EXPENDED":GOTO 1990 4730 IFD(5)<0THENPRINT"PHOTON TUBES ARE NOT OPERATIONAL":GOTO1990 4760 INPUT"PHOTON TORPEDO COURSE (1-9)";C1:IFC1=9THENC1=1 4780 IFC1>=1ANDC1<9THEN4850 4790 PRINT"ENSIGN CHEKOV REPORTS, 'INCORRECT COURSE DATA, SIR!'" 4800 GOTO1990 4850 X1=C(C1,1)+(C(C1+1,1)-C(C1,1))*(C1-INT(C1)):E=E-2:P=P-1 4860 X2=C(C1,2)+(C(C1+1,2)-C(C1,2))*(C1-INT(C1)):X=S1:Y=S2 4910 PRINT"TORPEDO TRACK:" 4920 X=X+X1:Y=Y+X2:X3=INT(X+.5):Y3=INT(Y+.5) 4960 IFX3<1ORX3>8ORY3<1ORY3>8THEN5490 5000 PRINT" ";X3;",";Y3:A$=" ":Z1=X:Z2=Y:GOSUB8830 5050 IFZ3<>0THEN4920 5060 A$="+K+":Z1=X:Z2=Y:GOSUB8830:IFZ3=0THEN5210 5110 PRINT"*** KLINGON DESTROYED ***":K3=K3-1:K9=K9-1:IFK9<=0THEN6370 5150 FORI=1TO3:IFX3=K(I,1)ANDY3=K(I,2)THEN5190 5180 NEXTI:I=3 5190 K(I,3)=0:GOTO5430 5210 A$=" * ":Z1=X:Z2=Y:GOSUB8830:IFZ3=0THEN5280 5260 PRINT"STAR AT";X3;",";Y3;"ABSORBED TORPEDO ENERGY.":GOSUB6000:GOTO1990 5280 A$=">!<":Z1=X:Z2=Y:GOSUB8830:IFZ3=0THEN4760 5330 PRINT"*** STARBASE DESTROYED ***":B3=B3-1:B9=B9-1 5360 IFB9>0ORK9>T-T0-T9THEN5400 5370 PRINT"THAT DOES IT, CAPTAIN!! YOU ARE HEREBY RELIEVED OF COMMAND" 5380 PRINT"AND SENTENCED TO 99 STARDATES AT HARD LABOR ON CYGNUS 12!!" 5390 GOTO 6270 5400 PRINT"STARFLEET COMMAND REVIEWING YOUR RECORD TO CONSIDER" 5410 PRINT"COURT MARTIAL!":D0=0 5430 Z1=X:Z2=Y:A$=" ":GOSUB8670 5470 G(Q1,Q2)=K3*100+B3*10+S3:Z(Q1,Q2)=G(Q1,Q2):GOSUB6000:GOTO1990 5490 PRINT"TORPEDO MISSED":GOSUB6000:GOTO1990 5520 REM SHIELD CONTROL 5530 IFD(7)<0THENPRINT"SHIELD CONTROL INOPERABLE":GOTO1990 5560 PRINT"ENERGY AVAILABLE =";E+S;:INPUT"NUMBER OF UNITS TO SHIELDS";X 5580 IFX<0ORS=XTHENPRINT"<SHIELDS UNCHANGED>":GOTO1990 5590 IFX<=E+STHEN5630 5600 PRINT"SHIELD CONTROL REPORTS 'THIS IS NOT THE FEDERATION TREASURY.'" 5610 PRINT"<SHIELDS UNCHANGED>":GOTO1990 5630 E=E+S-X:S=X:PRINT"DEFLECTOR CONTROL ROOM REPORT:" 5660 PRINT" 'SHIELDS NOW AT";INT(S);"UNITS PER YOUR COMMAND.'":GOTO1990 5680 REM DAMAGE CONTROL 5690 IFD(6)>=0THEN5910 5700 PRINT"DAMAGE CONTROL REPORT NOT AVAILABLE":IFD0=0THEN1990 5720 D3=0:FORI=1TO8:IFD(I)<0THEND3=D3+.1 5760 NEXTI:IFD3=0THEN1990 5780 PRINT:D3=D3+D4:IFD3>=1THEND3=.9 5810 PRINT"TECHNICIANS STANDING BY TO EFFECT REPAIRS TO YOUR SHIP;" 5820 PRINT"ESTIMATED TIME TO REPAIR:";.01*INT(100*D3);"STARDATES" 5840 INPUT "WILL YOU AUTHORIZE THE REPAIR ORDER (Y/N)";A$ 5860 IFA$<>"Y"THEN 1990 5870 FORI=1TO8:IFD(I)<0THEND(I)=0 5890 NEXTI:T=T+D3+.1 5910 PRINT:PRINT"DEVICE STATE OF REPAIR":FORR1=1TO8 5920 GOSUB8790:PRINTG2$;LEFT$(Z$,25-LEN(G2$));INT(D(R1)*100)*.01 5950 NEXTR1:PRINT:IFD0<>0THEN5720 5980 GOTO 1990 5990 REM KLINGONS SHOOTING 6000 IFK3<=0THENRETURN 6010 IFD0<>0THENPRINT"STARBASE SHIELDS PROTECT THE ENTERPRISE":RETURN 6040 FORI=1TO3:IFK(I,3)<=0THEN6200 6060 H=INT((K(I,3)/FND(1))*(2+RND(1))):S=S-H:K(I,3)=K(I,3)/(3+RND(0)) 6080 PRINTH;"UNIT HIT ON ENTERPRISE FROM SECTOR";K(I,1);",";K(I,2) 6090 IFS<=0THEN6240 6100 PRINT" <SHIELDS DOWN TO";S;"UNITS>":IFH<20THEN6200 6120 IFRND(1)>.6ORH/S<=.02THEN6200 6140 R1=FNR(1):D(R1)=D(R1)-H/S-.5*RND(1):GOSUB8790 6170 PRINT"DAMAGE CONTROL REPORTS ";G2$;" DAMAGED BY THE HIT'" 6200 NEXTI:RETURN 6210 REM END OF GAME 6220 PRINT"IT IS STARDATE";T:GOTO 6270 6240 PRINT:PRINT"THE ENTERPRISE HAS BEEN DESTROYED. THEN FEDERATION "; 6250 PRINT"WILL BE CONQUERED":GOTO 6220 6270 PRINT"THERE WERE";K9;"KLINGON BATTLE CRUISERS LEFT AT" 6280 PRINT"THE END OF YOUR MISSION." 6290 PRINT:PRINT:IFB9=0THEN6360 6310 PRINT"THE FEDERATION IS IN NEED OF A NEW STARSHIP COMMANDER" 6320 PRINT"FOR A SIMILAR MISSION -- IF THERE IS A VOLUNTEER," 6330 INPUT"LET HIM STEP FORWARD AND ENTER 'AYE'";A$:IFA$="AYE"THEN10 6360 END 6370 PRINT"CONGRULATION, CAPTAIN! THEN LAST KLINGON BATTLE CRUISER" 6380 PRINT"MENACING THE FDERATION HAS BEEN DESTROYED.":PRINT 6400 PRINT"YOUR EFFICIENCY RATING IS";1000*(K7/(T-T0))^2:GOTO6290 6420 REM SHORT RANGE SENSOR SCAN & STARTUP SUBROUTINE 6430 FORI=S1-1TOS1+1:FORJ=S2-1TOS2+1 6450 IFINT(I+.5)<1ORINT(I+.5)>8ORINT(J+.5)<1ORINT(J+.5)>8THEN6540 6490 A$=">!<":Z1=I:Z2=J:GOSUB8830:IFZ3=1THEN6580 6540 NEXTJ:NEXTI:D0=0:GOTO6650 6580 D0=1:C$="DOCKED":E=E0:P=P0 6620 PRINT"SHIELDS DROPPED FOR DOCKING PURPOSES":S=0:GOTO6720 6650 IFK3>0THENC$="*RED*":GOTO6720 6660 C$="GREEN":IFE<E0*.1THENC$="YELLOW" 6720 IFD(2)>=0THEN6770 6730 PRINT:PRINT"*** SHORT RANGE SENSORS ARE OUT ***":PRINT:RETURN 6770 O1$="---------------------------------":PRINTO1$:FORI=1TO8 6820 FORJ=(I-1)*24+1TO(I-1)*24+22STEP3:PRINT" ";MID$(Q$,J,3);:NEXTJ 6830 ONIGOTO6850,6900,6960,7020,7070,7120,7180,7240 6850 PRINT" STARDATE ";INT(T*10)*.1:GOTO7260 6900 PRINT" CONDITION ";C$:GOTO7260 6960 PRINT" QUADRANT ";Q1;",";Q2:GOTO7260 7020 PRINT" SECTOR ";S1;",";S2:GOTO7260 7070 PRINT" PHOTON TORPEDOES ";INT(P):GOTO7260 7120 PRINT" TOTAL ENERGY ";INT(E+S):GOTO7260 7180 PRINT" SHIELDS ";INT(S):GOTO7260 7240 PRINT" KLINGONS REMAINING";INT(K9) 7260 NEXTI:PRINTO1$:RETURN 7280 REM LIBRARY COMPUTER CODE 7290 IFD(8)<0THENPRINT"COMPUTER DISABLED":GOTO1990 7320 INPUT"COMPUTER ACTIVE AND AWAITING COMMAND";A:IFA<0THEN1990 7350 PRINT:H8=1:ONA+1GOTO7540,7900,8070,8500,8150,7400 7360 PRINT"FUNCTIONS AVAILABLE FROM LIBRARY-COMPUTER:" 7370 PRINT" 0 = CUMULATIVE GALACTIC RECORD" 7372 PRINT" 1 = STATUS REPORT" 7374 PRINT" 2 = PHOTON TORPEDO DATA" 7376 PRINT" 3 = STARBASE NAV DATA" 7378 PRINT" 4 = DIRECTION/DISTANCE CALCULATOR" 7380 PRINT" 5 = GALAXY 'REGION NAME' MAP":PRINT:GOTO7320 7390 REM SETUP TO CHANGE CUM GAL RECORD TO GALAXY MAP 7400 H8=0:G5=1:PRINT" THE GALAXY":GOTO7550 7530 REM CUM GALACTIC RECORD 7540 REM INPUT"DO YOU WANT A HARDCOPY? IS THE TTY ON (Y/N)";A$ 7542 REM IFA$="Y"THENPOKE1229,2:POKE1237,3:NULL1 7543 PRINT:PRINT" "; 7544 PRINT"COMPUTER RECORD OF GALAXY FOR QUADRANT";Q1;",";Q2 7546 PRINT 7550 PRINT" 1 2 3 4 5 6 7 8" 7560 O1$=" ----- ----- ----- ----- ----- ----- ----- -----" 7570 PRINTO1$:FORI=1TO8:PRINTI;:IFH8=0THEN7740 7630 FORJ=1TO8:PRINT" ";:IFZ(I,J)=0THENPRINT"***";:GOTO7720 7700 PRINTRIGHT$(STR$(Z(I,J)+1000),3); 7720 NEXTJ:GOTO7850 7740 Z4=I:Z5=1:GOSUB9030:J0=INT(15-.5*LEN(G2$)):PRINTTAB(J0);G2$; 7800 Z5=5:GOSUB 9030:J0=INT(39-.5*LEN(G2$)):PRINTTAB(J0);G2$; 7850 PRINT:PRINTO1$:NEXTI:PRINT:GOTO1990 7890 REM STATUS REPORT 7900 PRINT " STATUS REPORT:":X$="":IFK9>1THENX$="S" 7940 PRINT"KLINGON";X$;" LEFT: ";K9 7960 PRINT"MISSION MUST BE COMPLETED IN";.1*INT((T0+T9-T)*10);"STARDATES" 7970 X$="S":IFB9<2THENX$="":IFB9<1THEN8010 7980 PRINT"THE FEDERATION IS MAINTAINING";B9;"STARBASE";X$;" IN THE GALAXY" 7990 GOTO5690 8010 PRINT"YOUR STUPIDITY HAS LEFT YOU ON YOUR ON IN" 8020 PRINT" THE GALAXY -- YOU HAVE NO STARBASES LEFT!":GOTO5690 8060 REM TORPEDO, BASE NAV, D/D CALCULATOR 8070 IFK3<=0THEN4270 8080 X$="":IFK3>1THENX$="S" 8090 PRINT"FROM ENTERPRISE TO KLINGON BATTLE CRUSER";X$ 8100 H8=0:FORI=1TO3:IFK(I,3)<=0THEN8480 8110 W1=K(I,1):X=K(I,2) 8120 C1=S1:A=S2:GOTO8220 8150 PRINT"DIRECTION/DISTANCE CALCULATOR:" 8160 PRINT"YOU ARE AT QUADRANT ";Q1;",";Q2;" SECTOR ";S1;",";S2 8170 PRINT"PLEASE ENTER":INPUT" INITIAL COORDINATES (X,Y)";C1,A 8200 INPUT" FINAL COORDINATES (X,Y)";W1,X 8220 X=X-A:A=C1-W1:IFX<0THEN8350 8250 IFA<0THEN8410 8260 IFX>0THEN8280 8270 IFA=0THENC1=5:GOTO8290 8280 C1=1 8290 IFABS(A)<=ABS(X)THEN8330 8310 PRINT"DIRECTION =";C1+(((ABS(A)-ABS(X))+ABS(A))/ABS(A)):GOTO8460 8330 PRINT"DIRECTION =";C1+(ABS(A)/ABS(X)):GOTO8460 8350 IFA>0THENC1=3:GOTO8420 8360 IFX<>0THENC1=5:GOTO8290 8410 C1=7 8420 IFABS(A)>=ABS(X)THEN8450 8430 PRINT"DIRECTION =";C1+(((ABS(X)-ABS(A))+ABS(X))/ABS(X)):GOTO8460 8450 PRINT"DIRECTION =";C1+(ABS(X)/ABS(A)) 8460 PRINT"DISTANCE =";SQR(X^2+A^2):IFH8=1THEN1990 8480 NEXTI:GOTO1990 8500 IFB3<>0THENPRINT"FROM ENTERPRISE TO STARBASE:":W1=B4:X=B5:GOTO8120 8510 PRINT"MR. SPOCK REPORTS, 'SENSORS SHOW NO STARBASES IN THIS"; 8520 PRINT" QUADRANT.'":GOTO1990 8580 REM FIND EMPTY PLACE IN QUADRANT (FOR THINGS) 8590 R1=FNR(1):R2=FNR(1):A$=" ":Z1=R1:Z2=R2:GOSUB8830:IFZ3=0THEN8590 8600 RETURN 8660 REM INSERT IN STRING ARRAY FOR QUADRANT 8670 S8=INT(Z2-.5)*3+INT(Z1-.5)*24+1 8675 IF LEN(A$)<>3THEN PRINT"ERROR":STOP 8680 IFS8=1THENQ$=A$+RIGHT$(Q$,189):RETURN 8690 IFS8=190THENQ$=LEFT$(Q$,189)+A$:RETURN 8700 Q$=LEFT$(Q$,S8-1)+A$+RIGHT$(Q$,190-S8):RETURN 8780 REM PRINTS DEVICE NAME 8790 ONR1GOTO8792,8794,8796,8798,8800,8802,8804,8806 8792 G2$="WARP ENGINES":RETURN 8794 G2$="SHORT RANGE SENSORS":RETURN 8796 G2$="LONG RANGE SENSORS":RETURN 8798 G2$="PHASER CONTROL":RETURN 8800 G2$="PHOTON TUBES":RETURN 8802 G2$="DAMAGE CONTROL":RETURN 8804 G2$="SHIELD CONTROL":RETURN 8806 G2$="LIBRARY-COMPUTER":RETURN 8820 REM STRING COMPARISON IN QUADRANT ARRAY 8830 Z1=INT(Z1+.5):Z2=INT(Z2+.5):S8=(Z2-1)*3+(Z1-1)*24+1:Z3=0 8890 IFMID$(Q$,S8,3)<>A$THENRETURN 8900 Z3=1:RETURN 9010 REM QUADRANT NAME IN G2$ FROM Z4,Z5 (=Q1,Q2) 9020 REM CALL WITH G5=1 TO GET REGION NAME ONLY 9030 IFZ5<=4THENONZ4GOTO9040,9050,9060,9070,9080,9090,9100,9110 9035 GOTO9120 9040 G2$="ANTARES":GOTO9210 9050 G2$="RIGEL":GOTO9210 9060 G2$="PROCYON":GOTO9210 9070 G2$="VEGA":GOTO9210 9080 G2$="CANOPUS":GOTO9210 9090 G2$="ALTAIR":GOTO9210 9100 G2$="SAGITTARIUS":GOTO9210 9110 G2$="POLLUX":GOTO9210 9120 ONZ4GOTO9130,9140,9150,9160,9170,9180,9190,9200 9130 G2$="SIRIUS":GOTO9210 9140 G2$="DENEB":GOTO9210 9150 G2$="CAPELLA":GOTO9210 9160 G2$="BETELGEUSE":GOTO9210 9170 G2$="ALDEBARAN":GOTO9210 9180 G2$="REGULUS":GOTO9210 9190 G2$="ARCTURUS":GOTO9210 9200 G2$="SPICA" 9210 IFG5<>1THENONZ5GOTO9230,9240,9250,9260,9230,9240,9250,9260 9220 RETURN 9230 G2$=G2$+" I":RETURN 9240 G2$=G2$+" II":RETURN 9250 G2$=G2$+" III":RETURN 9260 G2$=G2$+" IV":RETURN 10 REM INSTRUCTIONS FOR "SUPER STARTREK" MAR 5, 1978 20 FOR I=1 TO 12:PRINT:NEXT I 21 PRINT TAB(10);"*************************************" 22 PRINT TAB(10);"* *" 23 PRINT TAB(10);"* *" 30 PRINT TAB(10);"* * * SUPER STAR TREK * * *" 31 PRINT TAB(10);"* *" 32 PRINT TAB(10);"* *" 35 PRINT TAB(10);"*************************************" 36 FOR I=1 TO 8:PRINT:NEXT I 40 INPUT "DO YOU NEED INSTRUCTIONS (Y/N)";K$:IF K$="N" THEN 2000 44 PRINT 45 REM PRINT "TURN THE TTY ON-LINE AND HIT ANY KEY EXCEPT RETURN" 46 REM IF INP(1)=13 THEN 46 50 REM POKE 1229,2:POKE 1237,3:NULL 1 90 PRINT" INSTRUCTIONS FOR 'SUPER STAR TREK'" 100 PRINT 110 PRINT"1. WHEN YOU SEE \COMMAND ?\ PRINTED, ENTER ONE OF THE LEGAL" 120 PRINT" COMMANDS (NAV,SRS,LRS,PHA,TOR,SHE,DAM,COM, OR XXX)." 130 PRINT"2. IF YOU SHOULD TYPE IN AN ILLEGAL COMMAND, YOU'LL GET A SHORT" 140 PRINT" LIST OF THE LEGAL COMMANDS PRINTED OUT." 150 PRINT"3. SOME COMMANDS REQUIRE YOU TO ENTER DATA (FOR EXAMPLE, THE" 160 PRINT" 'NAV' COMMAND COMES BACK WITH 'COURSE (1-9) ?'.) IF YOU" 170 PRINT" TYPE IN ILLEGAL DATA (LIKE NEGATIVE NUMBERS), THAN COMMAND" 180 PRINT" WILL BE ABORTED" 190 PRINT 270 PRINT" THE GALAXY IS DIVIDED INTO AN 8 X 8 QUADRANT GRID," 280 PRINT"AND EACH QUADRANT IS FURTHER DIVIDED INTO AN 8 X 8 SECTOR GRID." 290 PRINT 300 PRINT" YOU WILL BE ASSIGNED A STARTING POINT SOMEWHERE IN THE" 310 PRINT"GALAXY TO BEGIN A TOUR OF DUTY AS COMANDER OF THE STARSHIP" 320 PRINT"\ENTERPRISE\; YOUR MISSION: TO SEEK AND DESTROY THE FLEET OF" 330 PRINT"KLINGON WARWHIPS WHICH ARE MENACING THE UNITED FEDERATION OF" 340 PRINT"PLANETS." 360 PRINT 370 PRINT" YOU HAVE THE FOLLOWING COMMANDS AVAILABLE TO YOU AS CAPTAIN" 380 PRINT"OF THE STARSHIP ENTERPRISE:" 385 PRINT 390 PRINT"\NAV\ COMMAND = WARP ENGINE CONTROL --" 400 PRINT" COURSE IS IN A CIRCULAR NUMERICAL 4 3 2" 410 PRINT" VECTOR ARRANGEMENT AS SHOWN . . ." 420 PRINT" INTEGER AND REAL VALUES MAY BE ..." 430 PRINT" USED. (THUS COURSE 1.5 IS HALF- 5 ---*--- 1" 440 PRINT" WAY BETWEEN 1 AND 2 ..." 450 PRINT" . . ." 460 PRINT" VALUES MAY APPROACH 9.0, WHICH 6 7 8" 470 PRINT" ITSELF IS EQUIVALENT TO 1.0" 480 PRINT" COURSE" 490 PRINT" ONE WARP FACTOR IS THE SIZE OF " 500 PRINT" ONE QUADTANT. THEREFORE, TO GET" 510 PRINT" FROM QUADRANT 6,5 TO 5,5, YOU WOULD" 520 PRINT" USE COURSE 3, WARP FACTOR 1." 530 PRINT 540 PRINT"\SRS\ COMMAND = SHORT RANGE SENSOR SCAN" 550 PRINT" SHOWS YOU A SCAN OF YOUR PRESENT QUADRANT." 555 PRINT 560 PRINT" SYMBOLOGY ON YOUR SENSOR SCREEN IS AS FOLLOWS:" 570 PRINT" <*> = YOUR STARSHIP'S POSITION" 580 PRINT" +K+ = KLINGON BATTLE CRUISER" 590 PRINT" >!< = FEDERATION STARBASE (REFUEL/REPAIR/RE-ARM HERE!)" 600 PRINT" * = STAR" 605 PRINT 610 PRINT" A CONDENSED 'STATUS REPORT' WILL ALSO BE PRESENTED." 620 PRINT 640 PRINT"\LRS\ COMMAND = LONG RANGE SENSOR SCAN" 650 PRINT" SHOWS CONDITIONS IN SPACE FOR ONE QUADRANT ON EACH SIDE" 660 PRINT" OF THE ENTERPRISE (WHICH IS IN THE MIDDLE OF THE SCAN)" 670 PRINT" THE SCAN IS CODED IN THE FORM \###\, WHERE TH UNITS DIGIT" 680 PRINT" IS THE NUMBER OF STARS, THE TENS DIGIT IS THE NUMBER OF" 690 PRINT" STARBASES, AND THE HUNDRESDS DIGIT IS THE NUMBER OF" 700 PRINT" KLINGONS." 705 PRINT 706 PRINT" EXAMPLE - 207 = 2 KLINGONS, NO STARBASES, & 7 STARS." 710 PRINT 720 PRINT"\PHA\ COMMAND = PHASER CONTROL." 730 PRINT" ALLOWS YOU TO DESTROY THE KLINGON BATTLE CRUISERS BY " 740 PRINT" ZAPPING THEM WITH SUITABLY LARGE UNITS OF ENERGY TO" 750 PRINT" DEPLETE THEIR SHIELD POWER. (REMBER, KLINGONS HAVE" 760 PRINT" PHASERS TOO!)" 770 PRINT 780 PRINT"\TOR\ COMMAND = PHOTON TORPEDO CONTROL" 790 PRINT" TORPEDO COURSE IS THE SAME AS USED IN WARP ENGINE CONTROL" 800 PRINT" IF YOU HIT THE KLINGON VESSEL, HE IS DESTROYED AND" 810 PRINT" CANNOT FIRE BACK AT YOU. IF YOU MISS, YOU ARE SUBJECT TO" 820 PRINT" HIS PHASER FIRE. IN EITHER CASE, YOU ARE ALSO SUBJECT TO " 825 PRINT" THE PHASER FIRE OF ALL OTHER KLINGONS IN THE QUADRANT." 830 PRINT 835 PRINT" THE LIBRARY-COMPUTER (\COM\ COMMAND) HAS AN OPTION TO " 840 PRINT" COMPUTE TORPEDO TRAJECTORY FOR YOU (OPTION 2)" 850 PRINT 860 PRINT"\SHE\ COMMAND = SHIELD CONTROL" 870 PRINT" DEFINES THE NUMBER OF ENERGY UNITS TO BE ASSIGNED TO THE" 880 PRINT" SHIELDS. ENERGY IS TAKEN FROM TOTAL SHIP'S ENERGY. NOTE" 890 PRINT" THAN THE STATUS DISPLAY TOTAL ENERGY INCLUDES SHIELD ENERGY" 900 PRINT 910 PRINT"\DAM\ COMMAND = DAMMAGE CONTROL REPORT" 920 PRINT" GIVES THE STATE OF REPAIR OF ALL DEVICES. WHERE A NEGATIVE" 930 PRINT" 'STATE OF REPAIR' SHOWS THAT THE DEVICE IS TEMPORARILY" 940 PRINT" DAMAGED." 950 PRINT 960 PRINT"\COM\ COMMAND = LIBRARY-COMPUTER" 970 PRINT" THE LIBRARY-COMPUTER CONTAINS SIX OPTIONS:" 980 PRINT" OPTION 0 = CUMULATIVE GALACTIC RECORD" 990 PRINT" THIS OPTION SHOWES COMPUTER MEMORY OF THE RESULTS OF ALL" 1000 PRINT" PREVIOUS SHORT AND LONG RANGE SENSOR SCANS" 1010 PRINT" OPTION 1 = STATUS REPORT" 1020 PRINT" THIS OPTION SHOWS THE NUMBER OF KLINGONS, STARDATES," 1030 PRINT" AND STARBASES REMAINING IN THE GAME." 1040 PRINT" OPTION 2 = PHOTON TORPEDO DATA" 1050 PRINT" WHICH GIVES DIRECTIONS AND DISTANCE FROM THE ENTERPRISE" 1060 PRINT" TO ALL KLINGONS IN YOUR QUADRANT" 1070 PRINT" OPTION 3 = STARBASE NAV DATA" 1080 PRINT" THIS OPTION GIVES DIRECTION AND DISTANCE TO ANY " 1090 PRINT" STARBASE WITHIN YOUR QUADRANT" 1100 PRINT" OPTION 4 = DIRECTION/DISTANCE CALCULATOR" 1110 PRINT" THIS OPTION ALLOWS YOU TO ENTER COORDINATES FOR" 1120 PRINT" DIRECTION/DISTANCE CALCULATIONS" 1130 PRINT" OPTION 5 = GALACTIC /REGION NAME/ MAP" 1140 PRINT" THIS OPTION PRINTS THE NAMES OF THE SIXTEEN MAJOR " 1150 PRINT" GALACTIC REGIONS REFERRED TO IN THE GAME." 1990 REM POKE 1229,0:POKE 1237,1:NULL 0 2000 REM PRINT:PRINT:PRINT 2010 REM PRINT "TURN CASSETTE PLAYER ON AND HIT ANY KEY EXCEPT RETURN" 2020 REM IF INP(1)=13 THEN 2020 2030 REM PRINT 2040 REM PRINT "TURN CASSETTE PLAYER OFF AND " 2050 REM PRINT "TYPE 'RUN' WHEN COMPUTER PRINTS 'OK'" 2 PRINT TAB(33);"SYNONYM" 4 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 6 PRINT: PRINT: PRINT 10 DIM R$(5),W$(10),L(30),R(30) 20 R$(1)="RIGHT": R$(2)="CORRECT": R$(3)="FINE": R$(4)="GOOD!" 30 R$(5)="CHECK" 70 C=0 90 PRINT "A SYNONYM OF A WORD MEANS ANOTHER WORD IN THE ENGLISH" 100 PRINT "LANGUAGE WHICH HAS THE SAME OR VERY NEARLY THE SAME"; 110 PRINT " MEANING." 130 PRINT "I CHOOSE A WORD -- YOU TYPE A SYNONYM." 140 PRINT "IF YOU CAN'T THINK OF A SYNONYM, TYPE THE WORD 'HELP'" 145 PRINT "AND I WILL TELL YOU A SYNONYM.": PRINT 150 RESTORE: C=C+1: READ N 160 IF C>N THEN 420 170 N1=INT(RND(1)*N+1) 174 IF R(N1)=1 THEN 170 176 R(N1)=1 180 FOR I=1 TO N1 190 READ N2 200 FOR J=1 TO N2 210 READ W$(J) 220 NEXT J 230 NEXT I 232 FOR J=1 TO N2: L(J)=J: NEXT J 235 L(0)=N2: G=1: PRINT 237 L(G)=L(L(0)): L(0)=N2-1: PRINT 240 PRINT " WHAT IS A SYNONYM OF ";W$(G);: INPUT A$ 250 IF A$="HELP" THEN 340 260 FOR K=1 TO N2 270 IF G=K THEN 290 280 IF A$=W$(K) THEN 320 290 NEXT K 300 PRINT " TRY AGAIN.": GOTO 240 320 PRINT R$(INT(RND(1)*5+1)): GOTO 150 340 G1=INT(RND(1)*L(0)+1) 360 PRINT "**** A SYNONYM OF ";W$(G);" IS ";W$(L(G1));".": PRINT 370 L(G1)=L(L(0)): L(0)=L(0)-1: GOTO 240 420 PRINT: PRINT "SYNONYM DRILL COMPLETED.": GOTO 999 500 DATA 10 510 DATA 5,"FIRST","START","BEGINNING","ONSET","INITIAL" 520 DATA 5,"SIMILAR","ALIKE","SAME","LIKE","RESEMBLING" 530 DATA 5,"MODEL","PATTERN","PROTOTYPE","STANDARD","CRITERION" 540 DATA 5,"SMALL","INSIGNIFICANT","LITTLE","TINY","MINUTE" 550 DATA 6,"STOP","HALT","STAY","ARREST","CHECK","STANDSTILL" 560 DATA 6,"HOUSE","DWELLING","RESIDENCE","DOMICILE","LODGING" 565 DATA "HABITATION" 570 DATA 7,"PIT","HOLE","HOLLOW","WELL","GULF","CHASM","ABYSS" 580 DATA 7,"PUSH","SHOVE","THRUST","PROD","POKE","BUTT","PRESS" 590 DATA 6,"RED","ROUGE","SCARLET","CRIMSON","FLAME","RUBY" 600 DATA 7,"PAIN","SUFFERING","HURT","MISERY","DISTRESS","ACHE" 605 DATA "DISCOMFORT" 999 END 10 PRINT TAB(33);"TARGET" 20 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 30 PRINT: PRINT: PRINT 100 R=1: R1=57.296: P=3.14159 110 PRINT "YOU ARE THE WEAPONS OFFICER ON THE STARSHIP ENTERPRISE" 120 PRINT "AND THIS IS A TEST TO SEE HOW ACCURATE A SHOT YOU" 130 PRINT "ARE IN A THREE-DIMENSIONAL RANGE. YOU WILL BE TOLD" 140 PRINT "THE RADIAN OFFSET FOR THE X AND Z AXES, THE LOCATION" 150 PRINT "OF THE TARGET IN THREE DIMENSIONAL RECTANGULAR COORDINATES," 160 PRINT "THE APPROXIMATE NUMBER OF DEGREES FROM THE X AND Z" 170 PRINT "AXES, AND THE APPROXIMATE DISTANCE TO THE TARGET." 180 PRINT "YOU WILL THEN PROCEEED TO SHOOT AT THE TARGET UNTIL IT IS" 190 PRINT "DESTROYED!": PRINT: PRINT "GOOD LUCK!!":PRINT: PRINT 220 A=RND(1)*2*P: B=RND(1)*2*P: Q=INT(A*R1): W=INT(B*R1) 260 PRINT "RADIANS FROM X AXIS =";A;" FROM Z AXIS =";B 280 P1=100000*RND(1)+RND(1): X=SIN(B)*COS(A)*P1: Y=SIN(B)*SIN(A)*P1 290 Z=COS(B)*P1 340 PRINT "TARGET SIGHTED: APPROXIMATE COORDINATES: X=";X;" Y=";Y;" Z=";Z 345 R=R+1: IF R>5 THEN 390 350 ON R GOTO 355,360,365,370,375 355 P3=INT(P1*.05)*20: GOTO 390 360 P3=INT(P1*.1)*10: GOTO 390 365 P3=INT(P1*.5)*2: GOTO 390 370 P3=INT(P1): GOTO 390 375 P3=P1 390 PRINT " ESTIMATED DISTANCE:";P3 400 PRINT:PRINT "INPUT ANGLE DEVIATION FROM X, DEVIATION FROM Z, DISTANCE"; 405 INPUT A1,B1,P2 410 PRINT: IF P2<20 THEN PRINT "YOU BLEW YOURSELF UP!!": GOTO 580 420 A1=A1/R1: B1=B1/R1: PRINT "RADIANS FROM X AXIS =";A1;" "; 425 PRINT "FROM Z AXIS =";B1 480 X1=P2*SIN(B1)*COS(A1): Y1=P2*SIN(B1)*SIN(A1): Z1=P2*COS(B1) 510 D=((X1-X)^2+(Y1-Y)^2+(Z1-Z)^2)^(1/2) 520 IF D>20 THEN 670 530 PRINT: PRINT " * * * HIT * * * TARGET IS NON-FUNCTIONAL": PRINT 550 PRINT "DISTANCE OF EXPLOSION FROM TARGET WAS";D;"KILOMETERS." 570 PRINT: PRINT "MISSION ACCOMPLISHED IN ";R;" SHOTS." 580 R=0: FOR I=1 TO 5: PRINT: NEXT I: PRINT "NEXT TARGET...": PRINT 590 GOTO 220 670 X2=X1-X: Y2=Y1-Y: Z2=Z1-Z: IF X2<0 THEN 730 710 PRINT "SHOT IN FRONT OF TARGET";X2;"KILOMETERS.": GOTO 740 730 PRINT "SHOT BEHIND TARGET";-X2;"KILOMETERS." 740 IF Y2<0 THEN 770 750 PRINT "SHOT TO LEFT OF TARGET";Y2;"KILOMETERS.": GOTO 780 770 PRINT "SHOT TO RIGHT OF TARGET";-Y2;"KILOMETERS." 780 IF Z2<0 THEN 810 790 PRINT "SHOT ABOVE TARGET";Z2;"KILOMETERS.": GOTO 820 810 PRINT "SHOT BELOW TARGET";-Z2;"KILOMETERS." 820 PRINT "APPROX POSITION OF EXPLOSION: X=";X1;" Y=";Y1;" Z=";Z1 830 PRINT " DISTANCE FROM TARGET =";D: PRINT: PRINT: PRINT: GOTO 345 999 END 100 PRINT TAB(33);"QUBIC":PRINT 110 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 120 PRINT:PRINT:PRINT 210 PRINT "DO YOU WANT INSTRUCTIONS"; 220 INPUT C$ 230 IF LEFT$(C$,1)="N" THEN 315 240 IF LEFT$(C$,1)="Y" THEN 265 250 PRINT "INCORRECT ANSWER. PLEASE TYPE 'YES' OR 'NO'"; 260 GOTO 220 265 PRINT 270 PRINT "THE GAME IS TIC-TAC-TOE IN A 4 X 4 X 4 CUBE." 280 PRINT "EACH MOVE IS INDICATED BY A 3 DIGIT NUMBER, WITH EACH" 290 PRINT "DIGIT BETWEEN 1 AND 4 INCLUSIVE. THE DIGITS INDICATE THE" 300 PRINT "LEVEL, ROW, AND COLUMN, RESPECTIVELY, OF THE OCCUPIED" 305 PRINT "PLACE. " 306 PRINT 307 PRINT "TO PRINT THE PLAYING BOARD, TYPE 0 (ZERO) AS YOUR MOVE." 308 PRINT "THE PROGRAM WILL PRINT THE BOARD WITH YOUR MOVES INDI-" 309 PRINT "CATED WITH A (Y), THE MACHINE'S MOVES WITH AN (M), AND" 310 PRINT "UNUSED SQUARES WITH A ( ). OUTPUT IS ON PAPER." 311 PRINT 312 PRINT "TO STOP THE PROGRAM RUN, TYPE 1 AS YOUR MOVE." 313 PRINT:PRINT 315 DIM X(64),L(76),M(76,4),Y(16) 320 FOR I = 1 TO 16 330 READ Y(I) 340 NEXT I 350 FOR I=1 TO 76 360 FOR J = 1 TO 4 370 READ M(I,J) 380 NEXT J 390 NEXT I 400 FOR I = 1 TO 64 410 LET X(I)=0 420 NEXT I 430 LET Z=1 440 PRINT "DO YOU WANT TO MOVE FIRST"; 450 INPUT S$ 460 IF LEFT$(S$,1)="N" THEN 630 470 IF LEFT$(S$,1)="Y" THEN 500 480 PRINT "INCORRECT ANSWER. PLEASE TYPE 'YES' OR 'NO'."; 490 GOTO 450 500 PRINT " " 510 PRINT "YOUR MOVE"; 520 INPUT J1 521 IF J1=1 THEN 2770 522 IF J1<>0 THEN 525 523 GOSUB 2550 524 GOTO 500 525 IF J1<111 THEN 2750 526 IF J1>444 THEN 2750 530 GOSUB 2500 540 LET K1=INT(J1/100) 550 LET J2=(J1-K1*100) 560 LET K2=INT(J2/10) 570 LET K3= J1 - K1*100 -K2*10 580 LET M=16*K1+4*K2+K3-20 590 IF X(M)=0 THEN 620 600 PRINT "THAT SQUARE IS USED, TRY AGAIN." 610 GOTO 500 620 LET X(M)=1 630 GOSUB 1640 640 J=1 650 I=1 660 IF J=1 THEN 720 670 IF J=2 THEN 790 680 IF J=3 THEN 930 690 I=I+1: IF I<=76 THEN 660 700 J=J+1: IF J<=3 THEN 650 710 GOTO 1300 720 IF L(I)<>4 THEN 690 730 PRINT "YOU WIN AS FOLLOWS"; 740 FOR J=1 TO 4 750 LET M=M(I,J) 760 GOSUB 1570 770 NEXT J 780 GOTO 1490 790 IF L(I)<>15 THEN 690 800 FOR J=1 TO 4 810 LET M=M(I,J) 820 IF X(M)<>0 THEN 860 830 LET X(M)=5 840 PRINT "MACHINE MOVES TO"; 850 GOSUB 1570 860 NEXT J 870 PRINT ", AND WINS AS FOLLOWS" 880 FOR J=1 TO 4 890 LET M=M(I,J) 900 GOSUB 1570 910 NEXT J 920 GOTO 1490 930 IF L(I)<>3 THEN 690 940 PRINT "NICE TRY. MACHINE MOVES TO"; 950 FOR J=1 TO 4 960 LET M=M(I,J) 970 IF X(M)<>0 THEN 1010 980 LET X(M)=5 990 GOSUB 1570 1000 GOTO 500 1010 NEXT J 1020 GOTO 1300 1030 I=1 1040 LET L(I)=X(M(I,1))+X(M(I,2))+X(M(I,3))+X(M(I,4)) 1050 LET L = L(I) 1060 IF L <2 THEN 1130 1070 IF L>=3 THEN 1130 1080 IF L>2 THEN 2230 1090 FOR J = 1 TO 4 1100 IF X(M(I,J))<>0 THEN 1120 1110 LET X(M(I,J))=1/8 1120 NEXT J 1130 I=I+1: IF I<=76 THEN 1040 1140 GOSUB 1640 1150 I=1 1160 IF L(I)=1/2 THEN 2360 1170 IF L(I)=1+3/8 THEN 2360 1180 I=I+1: IF I<=76 THEN 1160 1190 GOTO 1830 1200 LET Z = 1 1210 IF X(Y(Z))=0 THEN 1250 1220 LET Z=Z+1 1230 IF Z<>17 THEN 1210 1240 GOTO 1720 1250 LET M=Y(Z) 1260 LET X(M)=5 1270 PRINT "MACHINE MOVES TO"; 1280 GOSUB 1570 1290 GOTO 500 1300 LET X=X 1310 I=1 1320 LET L(I)=X(M(I,1))+X(M(I,2))+X(M(I,3))+X(M(I,4)) 1330 LET L=L(I) 1340 IF L<10 THEN 1410 1350 IF L>=11 THEN 1410 1360 IF L>10 THEN 2230 1370 FOR J=1 TO 4 1380 IF X(M(I,J))<>0 THEN 1400 1390 LET X(M(I,J))=1/8 1400 NEXT J 1410 I=I+1: IF I<=76 THEN 1320 1420 GOSUB 1640 1430 I=1 1440 IF L(I)=.5 THEN 2360 1450 IF L(I)=5+3/8 THEN 2360 1460 I=I+1: IF I<=76 THEN 1440 1470 GOSUB 2500 1480 GOTO 1030 1490 PRINT " " 1500 PRINT "DO YOU WANT TO TRY ANOTHER GAME"; 1510 INPUT X$ 1520 IF LEFT$(X$,1)="Y" THEN 400 1530 IF LEFT$(X$,1)="N" THEN 1560 1540 PRINT "INCORRECT ANSWER. PLEASE TYPE 'YES' OR 'NO'"; 1550 GOTO 1510 1560 STOP:RUN "MENU" 1570 LET K1=INT((M-1)/16)+1 1580 LET J2=M-16*(K1-1) 1590 LET K2=INT((J2-1)/4)+1 1600 LET K3=M-(K1-1)*16-(K2-1)*4 1610 LET M=K1*100+K2*10+K3 1620 PRINT M; 1630 RETURN 1640 FOR S=1 TO 76 1650 LET J1 = M(S,1) 1660 LET J2=M(S,2) 1670 LET J3=M(S,3) 1680 LET J4=M(S,4) 1690 LET L(S)=X(J1)+X(J2)+X(J3)+X(J4) 1700 NEXT S 1710 RETURN 1720 FOR I=1 TO 64 1730 IF X(I)<>0 THEN 1800 1740 LET X(I)=5 1750 LET M=I 1760 PRINT "MACHINE LIKES"; 1770 GOSUB 1570 1780 PRINT " " 1790 GOTO 500 1800 NEXT I 1810 PRINT "THE GAME IS A DRAW." 1820 GOTO 1490 1830 FOR K=1 TO 18 1840 LET P=0 1850 FOR I=4*K-3 TO 4*K 1860 FOR J=1 TO 4 1870 LET P=P+X(M(I,J)) 1880 NEXT J 1890 NEXT I 1900 IF P<4 THEN 1940 1910 IF P<5 THEN 1970 1920 IF P<9 THEN 1940 1930 IF P<10 THEN 1970 1940 NEXT K 1950 GOSUB 2500 1960 GOTO 1200 1970 LET S=1/8 1980 FOR I=4*K-3 TO 4*K 1990 GOTO 2370 2000 NEXT I 2010 LET S=0 2020 GOTO 1980 2030 DATA 1,49,52,4,13,61,64,16,22,39,23,38,26,42,27,43 2040 DATA 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20 2050 DATA 21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38 2060 DATA 39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56 2070 DATA 57,58,59,60,61,62,63,64 2080 DATA 1,17,33,49,5,21,37,53,9,25,41,57,13,29,45,61 2090 DATA 2,18,34,50,6,22,38,54,10,26,42,58,14,30,46,62 2100 DATA 3,19,35,51,7,23,39,55,11,27,43,59,15,31,47,63 2110 DATA 4,20,36,52,8,24,40,56,12,28,44,60,16,32,48,64 2120 DATA 1,5,9,13,17,21,25,29,33,37,41,45,49,53,57,61 2130 DATA 2,6,10,14,18,22,26,30,34,38,42,46,50,54,58,62 2140 DATA 3,7,11,15,19,23,27,31,35,39,43,47,51,55,59,63 2150 DATA 4,8,12,16,20,24,28,32,36,40,44,48,52,56,60,64 2160 DATA 1,6,11,16,17,22,27,32,33,38,43,48,49,54,59,64 2170 DATA 13,10,7,4,29,26,23,20,45,42,39,36,61,58,55,52 2180 DATA 1,21,41,61,2,22,42,62,3,23,43,63,4,24,44,64 2190 DATA 49,37,25,13,50,38,26,14,51,39,27,15,52,40,28,16 2200 DATA 1,18,35,52,5,22,39,56,9,26,43,60,13,30,47,64 2210 DATA 49,34,19,4,53,38,23,8,57,42,27,12,61,46,31,16 2220 DATA 1,22,43,64,16,27,38,49,4,23,42,61,13,26,39,52 2230 FOR J=1 TO 4 2240 IF X(M(I,J))<>1/8 THEN 2330 2250 LET X(M(I,J))=5 2260 IF L(I)<5 THEN 2290 2270 PRINT "LET'S SEE YOU GET OUT OF THIS: MACHINE MOVES TO"; 2280 GOTO 2300 2290 PRINT "YOU FOX. JUST IN THE NICK OF TIME, MACHINE MOVES TO"; 2300 LET M=M(I,J) 2310 GOSUB 1570 2320 GOTO 500 2330 NEXT J 2340 PRINT "MACHINE CONCEDES THIS GAME." 2350 GOTO 1490 2360 LET S=1/8 2370 IF I-INT(I/4)*4>1 THEN 2400 2380 LET A=1 2390 GOTO 2410 2400 LET A=2 2410 FOR J=A TO 5-A STEP 5-2*A 2420 IF X(M(I,J))=S THEN 2450 2430 NEXT J 2440 GOTO 2000 2450 LET X(M(I,J))=5 2460 LET M=M(I,J) 2470 PRINT "MACHINE TAKES"; 2480 GOSUB 1570 2490 GOTO 500 2500 FOR I=1 TO 64 2510 IF X(I)<>1/8 THEN 2530 2520 LET X(I)=0 2530 NEXT I 2540 RETURN 2550 FOR XX=1 TO 9:PRINT:NEXT:FOR I=1 TO 4 2560 FOR J=1 TO 4 2562 FOR I1=1 TO J 2564 PRINT" "; 2566 NEXT I1 2570 FOR K=1 TO 4 2600 LET Q=16*I+4*J+K-20 2610 IF X(Q)<>O THEN 2630 2620 PRINT"( ) "; 2630 IF X(Q)<>5 THEN 2650 2640 PRINT"(M) "; 2650 IF X(Q)<>1 THEN 2660 2655 PRINT"(Y) "; 2660 IF X(Q)<>1/8 THEN 2670 2665 PRINT"( ) "; 2670 NEXT K 2680 PRINT 2690 PRINT 2700 NEXT J 2710 PRINT 2720 PRINT 2730 NEXT I 2735 REM PRINT CHR$(12) 2740 RETURN 2750 PRINT"INCORRECT MOVE, RETYPE IT--"; 2760 GOTO 520 2770 END 10 PRINT TAB(30);"TIC TAC TOE" 20 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 30 PRINT:PRINT:PRINT 50 REM 100 REM THIS PROGRAM PLAYS TIC TAC TOE 110 REM THE MACHINE GOES FIRST 120 PRINT "THE GAME BOARD IS NUMBERED:": PRINT 130 PRINT "1 2 3": PRINT "8 9 4": PRINT "7 6 5" 140 PRINT 150 REM 160 REM 170 REM 180 DEF FNM(X)=X-8*INT((X-1)/8) 190 REM 200 REM MAIN PROGRAM 210 PRINT 220 PRINT 230 A=9 240 M=A 250 GOSUB 650 260 P=M 270 B=FNM(P+1) 280 M=B 290 GOSUB 650 300 Q=M 310 IF Q=FNM(B+4) THEN 360 320 C=FNM(B+4) 330 M=C 340 GOSUB 700 350 GOTO 730 360 C=FNM(B+2) 370 M=C 380 GOSUB 650 390 R=M 400 IF R=FNM(C+4) THEN 450 410 D=FNM(C+4) 420 M=D 430 GOSUB 700 440 GOTO 730 450 IF P/2<>INT(P/2) THEN 500 460 D=FNM(C+7) 470 M=D 480 GOSUB 700 490 GOTO 730 500 D=FNM(C+3) 510 M=D 520 GOSUB 650 530 S=M 540 IF S=FNM(D+4) THEN 590 550 E=FNM(D+4) 560 M=E 570 GOSUB 700 580 REM 590 E=FNM(D+6) 600 M=E 610 GOSUB 700 620 PRINT "THE GAME IS A DRAW." 630 GOTO 210 640 REM 650 GOSUB 700 660 PRINT "YOUR MOVE"; 670 INPUT M 680 RETURN 700 PRINT "COMPUTER MOVES";M 710 RETURN 720 REM 730 PRINT "AND WINS ********" 740 GOTO 210 750 END 2 PRINT TAB(30);"TIC-TAC-TOE" 4 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 6 PRINT:PRINT:PRINT 8 PRINT "THE BOARD IS NUMBERED:" 10 PRINT " 1 2 3" 12 PRINT " 4 5 6" 14 PRINT " 7 8 9" 16 PRINT:PRINT:PRINT 20 DIM S(9) 50 INPUT"DO YOU WANT 'X' OR 'O'";C$ 55 IF C$="X"THEN 475 60 P$="O":Q$="X" 100 G=-1:H=1:IF S(5)<>0 THEN 103 102 S(5)=-1:GOTO 195 103 IF S(5)<>1 THEN 106 104 IF S(1)<>0 THEN 110 105 S(1)=-1:GOTO 195 106 IF S(2)=1 AND S(1)=0 THEN 181 107 IF S(4)=1 AND S(1)=0 THEN 181 108 IF S(6)=1 AND S(9)=0 THEN 189 109 IF S(8)=1 AND S(9)=0 THEN 189 110 IF G=1 THEN 112 111 GOTO 118 112 J=3*INT((M-1)/3)+1 113 IF 3*INT((M-1)/3)+1=M THEN K=1 114 IF 3*INT((M-1)/3)+2=M THEN K=2 115 IF 3*INT((M-1)/3)+3=M THEN K=3 116 GOTO 120 118 FOR J=1 TO 7 STEP 3:FOR K=1 TO 3 120 IF S(J)<>G THEN 130 122 IF S(J+2)<>G THEN 135 126 IF S(J+1)<>0 THEN 150 128 S(J+1)=-1:GOTO 195 130 IF S(J)=H THEN 150 131 IF S(J+2)<>G THEN 150 132 IF S(J+1)<>G THEN 150 133 S(J)=-1:GOTO 195 135 IF S(J+2)<>0 THEN 150 136 IF S(J+1)<>G THEN 150 138 S(J+2)=-1:GOTO 195 150 IF S(K)<>G THEN 160 152 IF S(K+6)<>G THEN 165 156 IF S(K+3)<>0 THEN 170 158 S(K+3)=-1:GOTO 195 160 IF S(K)=H THEN 170 161 IF S(K+6)<>G THEN 170 162 IF S(K+3)<>G THEN 170 163 S(K)=-1:GOTO 195 165 IF S(K+6)<>0 THEN 170 166 IF S(K+3)<>G THEN 170 168 S(K+6)=-1:GOTO 195 170 GOTO 450 171 IF S(3)=G AND S(7)=0 THEN 187 172 IF S(9)=G AND S(1)=0 THEN 181 173 IF S(7)=G AND S(3)=0 THEN 183 174 IF S(9)=0 AND S(1)=G THEN 189 175 IF G=-1 THEN G=1:H=-1:GOTO 110 176 IF S(9)=1 AND S(3)=0 THEN 182 177 FOR I=2 TO 9:IF S(I)<>0 THEN 179 178 S(I)=-1:GOTO 195 179 NEXT I 181 S(1)=-1:GOTO 195 182 IF S(1)=1 THEN 177 183 S(3)=-1:GOTO 195 187 S(7)=-1:GOTO 195 189 S(9)=-1 195 PRINT:PRINT"THE COMPUTER MOVES TO..." 202 GOSUB 1000 205 GOTO 500 450 IF G=1 THEN 465 455 IF J=7 AND K=3 THEN 465 460 NEXT K,J 465 IF S(5)=G THEN 171 467 GOTO 175 475 P$="X":Q$="O" 500 PRINT:INPUT"WHERE DO YOU MOVE";M 502 IF M=0 THEN PRINT"THANKS FOR THE GAME.":GOTO 2000 503 IF M>9 THEN 506 505 IF S(M)=0 THEN 510 506 PRINT"THAT SQUARE IS OCCUPIED.":PRINT:PRINT:GOTO 500 510 G=1:S(M)=1 520 GOSUB 1000 530 GOTO 100 1000 PRINT:FOR I=1 TO 9:PRINT" ";:IF S(I)<>-1 THEN 1014 1012 PRINT Q$" ";:GOTO 1020 1014 IF S(I)<>0 THEN 1018 1016 PRINT" ";:GOTO 1020 1018 PRINT P$" "; 1020 IF I<>3 AND I<>6 THEN 1050 1030 PRINT:PRINT"---+---+---" 1040 GOTO 1080 1050 IF I=9 THEN 1080 1060 PRINT"!"; 1080 NEXT I:PRINT:PRINT:PRINT 1095 FOR I=1 TO 7 STEP 3 1100 IF S(I)<>S(I+1)THEN 1115 1105 IF S(I)<>S(I+2)THEN 1115 1110 IF S(I)=-1 THEN 1350 1112 IF S(I)=1 THEN 1200 1115 NEXT I:FOR I=1 TO 3:IF S(I)<>S(I+3)THEN 1150 1130 IF S(I)<>S(I+6)THEN 1150 1135 IF S(I)=-1 THEN 1350 1137 IF S(I)=1 THEN 1200 1150 NEXT I:FOR I=1 TO 9:IF S(I)=0 THEN 1155 1152 NEXT I:GOTO 1400 1155 IF S(5)<>G THEN 1170 1160 IF S(1)=G AND S(9)=G THEN 1180 1165 IF S(3)=G AND S(7)=G THEN 1180 1170 RETURN 1180 IF G=-1 THEN 1350 1200 PRINT"YOU BEAT ME!! GOOD GAME.":GOTO 2000 1350 PRINT"I WIN, TURKEY!!!":GOTO 2000 1400 PRINT"IT'S A DRAW. THANK YOU." 2000 END 10 PRINT TAB(33);"TOWERS" 20 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 30 PRINT:PRINT:PRINT 90 PRINT 100 REM*** INITIALIZE 110 DIM T(7,3) 120 E=0 130 FOR D=1 TO 7 140 FOR N=1 TO 3 150 T(D,N)=0 160 NEXT N 170 NEXT D 180 PRINT "TOWERS OF HANOI PUZZLE.": PRINT 200 PRINT "YOU MUST TRANSFER THE DISKS FROM THE LEFT TO THE RIGHT" 205 PRINT "TOWER, ONE AT A TIME, NEVER PUTTING A LARGER DISK ON A" 210 PRINT "SMALLER DISK.": PRINT 215 INPUT "HOW MANY DISKS DO YOU WANT TO MOVE (7 IS MAX)";S 220 PRINT 230 M=0 240 FOR Q=1 TO 7 250 IF Q=S THEN 350 260 NEXT Q 270 E=E+1 280 IF E>2 THEN 310 290 PRINT "SORRY, BUT I CAN'T DO THAT JOB FOR YOU.": GOTO 215 310 PRINT "ALL RIGHT, WISE GUY, IF YOU CAN'T PLAY THE GAME RIGHT, I'LL" 320 PRINT "JUST TAKE MY PUZZLE AND GO HOME. SO LONG.": STOP 340 REM *** STORE DISKS FROM SMALLEST TO LARGEST 350 PRINT "IN THIS PROGRAM, WE SHALL REFER TO DISKS BY NUMERICAL CODE." 355 PRINT "3 WILL REPRESENT THE SMALLEST DISK, 5 THE NEXT SIZE," 360 PRINT "7 THE NEXT, AND SO ON, UP TO 15. IF YOU DO THE PUZZLE WITH" 365 PRINT "2 DISKS, THEIR CODE NAMES WOULD BE 13 AND 15. WITH 3 DISKS" 370 PRINT "THE CODE NAMES WOULD BE 11, 13 AND 15, ETC. THE NEEDLES" 375 PRINT "ARE NUMBERED FROM LEFT TO RIGHT, 1 TO 3. WE WILL" 380 PRINT "START WITH THE DISKS ON NEEDLE 1, AND ATTEMPT TO MOVE THEM" 385 PRINT "TO NEEDLE 3." 390 PRINT: PRINT "GOOD LUCK!": PRINT 400 Y=7: D=15 420 FOR X=S TO 1 STEP -1 430 T(Y,1)=D: D=D-2: Y=Y-1 460 NEXT X 470 GOSUB 1230 480 PRINT "WHICH DISK WOULD YOU LIKE TO MOVE";:E=0 500 INPUT D 510 IF (D-3)*(D-5)*(D-7)*(D-9)*(D-11)*(D-13)*(D-15)=0 THEN 580 520 PRINT "ILLEGAL ENTRY... YOU MAY ONLY TYPE 3,5,7,9,11,13, OR 15." 530 E=E+1: IF E>1 THEN 560 550 GOTO 500 560 PRINT "STOP WASTING MY TIME. GO BOTHER SOMEONE ELSE.": STOP 580 REM *** CHECK IF REQUESTED DISK IS BELOW ANOTHER 590 FOR R=1 TO 7 600 FOR C=1 TO 3 610 IF T(R,C)=D THEN 640 620 NEXT C: NEXT R 640 FOR Q=R TO 1 STEP -1 645 IF T(Q,C)=0 THEN 660 650 IF T(Q,C)<D THEN 680 660 NEXT Q 670 GOTO 700 680 PRINT "THAT DISK IS BELOW ANOTHER ONE. MAKE ANOTHER CHOICE." 690 GOTO 480 700 E=0 705 INPUT "PLACE DISK ON WHICH NEEDLE";N 730 IF (N-1)*(N-2)*(N-3)=0 THEN 800 735 E=E+1 740 IF E>1 THEN 780 750 PRINT "I'LL ASSUME YOU HIT THE WRONG KEY THIS TIME. BUT WATCH IT," 760 PRINT "I ONLY ALLOW ONE MISTAKE.": GOTO 705 780 PRINT "I TRIED TO WARN YOU, BUT YOU WOULDN'T LISTEN." 790 PRINT "BYE BYE, BIG SHOT.":STOP 800 FOR R=1 TO 7 810 IF T(R,N)<>0 THEN 840 820 NEXT R 830 GOTO 880 835 REM *** CHECK IF DISK TO BE PLACED ON A LARGER ONE 840 IF D<T(R,N) THEN 880 850 PRINT "YOU CAN'T PLACE A LARGER DISK ON TOP OF A SMALLER ONE," 860 PRINT "IT MIGHT CRUSH IT!": PRINT "NOW THEN, ";:GOTO 480 875 REM *** MOVE RELOCATED DISK 880 FOR V=1 TO 7: FOR W=1 TO 3 900 IF T(V,W)=D THEN 930 910 NEXT W: NEXT V 925 REM *** LOCATE EMPTY SPACE ON NEEDLE N 930 FOR U=1 TO 7 940 IF T(U,N)<>0 THEN 970 950 NEXT U 960 U=7: GOTO 980 965 REM *** MOVE DISK AND SET OLD LOCATION TO 0 970 U=U-1 980 T(U,N)=T(V,W): T(V,W)=0 995 REM *** PRINT OUT CURRENT STATUS 1000 GOSUB 1230 1018 REM *** CHECK IF DONE 1020 M=M+1 1030 FOR R=1 TO 7: FOR C=1 TO 2 1050 IF T(R,C)<>0 THEN 1090 1060 NEXT C: NEXT R 1080 GOTO 1120 1090 IF M<=128 THEN 480 1100 PRINT "SORRY, BUT I HAVE ORDERS TO STOP IF YOU MAKE MORE THAN" 1110 PRINT "128 MOVES.": STOP 1120 IF M<>2^S-1 THEN 1140 1130 PRINT:PRINT "CONGRATULATIONS!!":PRINT 1140 PRINT "YOU HAVE PERFORMED THE TASK IN";M;"MOVES." 1150 PRINT: PRINT "TRY AGAIN (YES OR NO)";: INPUT A$ 1160 IF A$="NO" THEN 1390 1170 IF A$="YES" THEN 90 1180 PRINT: PRINT "'YES' OR 'NO' PLEASE";: INPUT A$: GOTO 1160 1230 REM *** PRINT SUBROUTINE 1240 FOR K=1 TO 7 1250 Z=10 1260 FOR J=1 TO 3 1270 IF T(K,J)=0 THEN 1330 1280 PRINT TAB(Z-INT(T(K,J)/2)); 1290 FOR V=1 TO T(K,J) 1300 PRINT "*"; 1310 NEXT V 1320 GOTO 1340 1330 PRINT TAB(Z);"*"; 1340 Z=Z+21 1350 NEXT J 1360 PRINT 1370 NEXT K 1380 RETURN 1390 PRINT: PRINT "THANKS FOR THE GAME!": PRINT: END 1 PRINT TAB(33);"TRAIN" 2 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 3 PRINT: PRINT: PRINT 4 PRINT "TIME - SPEED DISTANCE EXERCISE": PRINT 10 C=INT(25*RND(1))+40 15 D=INT(15*RND(1))+5 20 T=INT(19*RND(1))+20 25 PRINT " A CAR TRAVELING";C;"MPH CAN MAKE A CERTAIN TRIP IN" 30 PRINT D;"HOURS LESS THAN A TRAIN TRAVELING AT";T;"MPH." 35 PRINT "HOW LONG DOES THE TRIP TAKE BY CAR"; 40 INPUT A 45 V=D*T/(C-T) 50 E=INT(ABS((V-A)*100/A)+.5) 55 IF E>5 THEN 70 60 PRINT "GOOD! ANSWER WITHIN";E;"PERCENT." 65 GOTO 80 70 PRINT "SORRY. YOU WERE OFF BY";E;"PERCENT." 80 PRINT "CORRECT ANSWER IS";V;"HOURS." 90 PRINT 95 PRINT "ANOTHER PROBLEM (YES OR NO)"; 100 INPUT A$ 105 PRINT 110 IF A$="YES" THEN 10 999 END 1 PRINT TAB(34);"TRAP" 2 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 3 PRINT:PRINT:PRINT 10 G=6 20 N=100 30 REM-TRAP 40 REM-STEVE ULLMAN, 8-1-72 50 PRINT "INSTRUCTIONS"; 60 INPUT Z$ 70 IF LEFT$(Z$,1)<>"Y" THEN 180 80 PRINT "I AM THINKING OF A NUMBER BETWEEN 1 AND";N 90 PRINT "TRY TO GUESS MY NUMBER. ON EACH GUESS," 100 PRINT "YOU ARE TO ENTER 2 NUMBERS, TRYING TO TRAP" 110 PRINT "MY NUMBER BETWEEN THE TWO NUMBERS. I WILL" 120 PRINT "TELL YOU IF YOU HAVE TRAPPED MY NUMBER, IF MY" 130 PRINT "NUMBER IS LARGER THAN YOUR TWO NUMBERS, OR IF" 140 PRINT "MY NUMBER IS SMALLER THAN YOUR TWO NUMBERS." 150 PRINT "IF YOU WANT TO GUESS ONE SINGLE NUMBER, TYPE" 160 PRINT "YOUR GUESS FOR BOTH YOUR TRAP NUMBERS." 170 PRINT "YOU GET";G;"GUESSES TO GET MY NUMBER." 180 X=INT(N*RND(1))+1 190 FOR Q=1 TO G 200 PRINT 210 PRINT "GUESS #";Q; 220 INPUT A,B 230 IF A=B AND X=A THEN 400 240 IF A <= B THEN 260 250 GOSUB 360 260 IF A <= X AND X <= B THEN 320 270 IF X<A THEN 300 280 PRINT "MY NUMBER IS LARGER THAN YOUR TRAP NUMBERS." 290 GOTO 330 300 PRINT "MY NUMBER IS SMALLER THAN YOUR TRAP NUMBERS." 310 GOTO 330 320 PRINT "YOU HAVE TRAPPED MY NUMBER." 330 NEXT Q 340 PRINT "SORRY, THAT'S";G;"GUESSES. THE NUMBER WAS";X 345 PRINT 350 GOTO 410 360 R=A 370 A=B 380 B=R 390 RETURN 400 PRINT "YOU GOT IT!!!" 410 PRINT 420 PRINT "TRY AGAIN." 430 PRINT 440 GOTO 180 450 END 10 PRINT TAB(33);"WAR" 20 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 30 PRINT: PRINT: PRINT 100 PRINT "THIS IS THE CARD GAME OF WAR. EACH CARD IS GIVEN BY SUIT-#" 110 PRINT "AS S-7 FOR SPADE 7. "; 120 PRINT "DO YOU WANT DIRECTIONS"; 130 INPUT B$ 140 IF B$="NO" THEN 210 150 IF B$="YES" THEN 180 160 PRINT "YES OR NO, PLEASE. "; 170 GOTO 120 180 PRINT "THE COMPUTER GIVES YOU AND IT A 'CARD'. THE HIGHER CARD" 190 PRINT "(NUMERICALLY) WINS. THE GAME ENDS WHEN YOU CHOOSE NOT TO" 200 PRINT "CONTINUE OR WHEN YOU HAVE FINISHED THE PACK." 210 PRINT 220 PRINT 230 DIM A$(52),L(54) 240 FOR I=1 TO 52 250 READ A$(I) 260 NEXT I 270 REM 280 FOR J=1 TO 52 290 LET L(J)=INT(52*RND(1))+1 295 IF J=1 THEN 350 300 FOR K=1 TO J-1 310 IF L(K)<>L(J) THEN 340 320 REM 330 GOTO 290 340 NEXT K 350 NEXT J 360 P=P+1 370 M1=L(P) 380 P=P+1 390 M2=L(P) 400 PRINT 420 PRINT "YOU: ";A$(M1),"COMPUTER: ";A$(M2) 430 N1=INT((M1-.5)/4) 440 N2=INT((M2-.5)/4) 450 IF N1>=N2 THEN 490 460 A1=A1+1 470 PRINT "THE COMPUTER WINS!!! YOU HAVE";B1;"AND THE COMPUTER HAS";A1 480 GOTO 540 490 IF N1=N2 THEN 530 500 B1=B1+1 510 PRINT "YOU WIN. YOU HAVE";B1;"AND THE COMPUTER HAS";A1 520 GOTO 540 530 PRINT "TIE. NO SCORE CHANGE." 540 IF L(P+1)=0 THEN 610 550 PRINT "DO YOU WANT TO CONTINUE"; 560 INPUT V$ 570 IF V$="YES" THEN 360 580 IF V$="NO" THEN 650 590 PRINT "YES OR NO, PLEASE. "; 600 GOTO 540 610 PRINT 620 PRINT 630 PRINT "WE HAVE RUN OUT OF CARDS. FINAL SCORE: YOU: ";B1; 640 PRINT " THE COMPUTER: ";A1:PRINT 650 PRINT "THANKS FOR PLAYING. IT WAS FUN." 655 PRINT 660 DATA "S-2","H-2","C-2","D-2","S-3","H-3","C-3","D-3" 670 DATA "S-4","H-4","C-4","D-4","S-5","H-5","C-5","D-5" 680 DATA "S-6","H-6","C-6","D-6","S-7","H-7","C-7","D-7" 690 DATA "S-8","H-8","C-8","D-8","S-9","H-9","C-9","D-9" 700 DATA "S-10","H-10","C-10","D-10","S-J","H-J","C-J","D-J" 710 DATA "S-Q","H-Q","C-Q","D-Q","S-K","H-K","C-K","D-K" 720 DATA "S-A","H-A","C-A","D-A" 999 END 10 PRINT TAB(32);"WEEKDAY" 20 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 30 PRINT:PRINT:PRINT 100 PRINT "WEEKDAY IS A COMPUTER DEMONSTRATION THAT" 110 PRINT"GIVES FACTS ABOUT A DATE OF INTEREST TO YOU." 120 PRINT 130 PRINT "ENTER TODAY'S DATE IN THE FORM: 3,24,1979 "; 140 INPUT M1,D1,Y1 150 REM THIS PROGRAM DETERMINES THE DAY OF THE WEEK 160 REM FOR A DATE AFTER 1582 170 DEF FNA(A)=INT(A/4) 180 DIM T(12) 190 DEF FNB(A)=INT(A/7) 200 REM SPACE OUTPUT AND READ IN INITIAL VALUES FOR MONTHS. 210 FOR I= 1 TO 12 220 READ T(I) 230 NEXT I 240 PRINT"ENTER DAY OF BIRTH (OR OTHER DAY OF INTEREST)"; 250 INPUT M,D,Y 260 PRINT 270 LET I1 = INT((Y-1500)/100) 280 REM TEST FOR DATE BEFORE CURRENT CALENDAR. 290 IF Y-1582 <0 THEN 1300 300 LET A = I1*5+(I1+3)/4 310 LET I2=INT(A-FNB(A)*7) 320 LET Y2=INT(Y/100) 330 LET Y3 =INT(Y-Y2*100) 340 LET A =Y3/4+Y3+D+T(M)+I2 350 LET B=INT(A-FNB(A)*7)+1 360 IF M > 2 THEN 470 370 IF Y3 = 0 THEN 440 380 LET T1=INT(Y-FNA(Y)*4) 390 IF T1 <> 0 THEN 470 400 IF B<>0 THEN 420 410 LET B=6 420 LET B = B-1 430 GOTO 470 440 LET A = I1-1 450 LET T1=INT(A-FNA(A)*4) 460 IF T1 = 0 THEN 400 470 IF B <>0 THEN 490 480 LET B = 7 490 IF (Y1*12+M1)*31+D1<(Y*12+M)*31+D THEN 550 500 IF (Y1*12+M1)*31+D1=(Y*12+M)*31+D THEN 530 510 PRINT M;"/";D;"/";Y;" WAS A "; 520 GOTO 570 530 PRINT M;"/";D;"/";Y;" IS A "; 540 GOTO 570 550 PRINT M;"/";D;"/";Y;" WILL BE A "; 560 REM PRINT THE DAY OF THE WEEK THE DATE FALLS ON. 570 IF B <>1 THEN 590 580 PRINT "SUNDAY." 590 IF B<>2 THEN 610 600 PRINT "MONDAY." 610 IF B<>3 THEN 630 620 PRINT "TUESDAY." 630 IF B<>4 THEN 650 640 PRINT "WEDNESDAY." 650 IF B<>5 THEN 670 660 PRINT "THURSDAY." 670 IF B<>6 THEN 690 680 GOTO 1250 690 IF B<>7 THEN 710 700 PRINT "SATURDAY." 710 IF (Y1*12+M1)*31+D1=(Y*12+M)*31+D THEN 1120 720 LET I5=Y1-Y 730 PRINT 740 LET I6=M1-M 750 LET I7=D1-D 760 IF I7>=0 THEN 790 770 LET I6= I6-1 780 LET I7=I7+30 790 IF I6>=0 THEN 820 800 LET I5=I5-1 810 LET I6=I6+12 820 IF I5<0 THEN 1310 830 IF I7 <> 0 THEN 850 835 IF I6 <> 0 THEN 850 840 PRINT"***HAPPY BIRTHDAY***" 850 PRINT " "," ","YEARS","MONTHS","DAYS" 855 PRINT " "," ","-----","------","----" 860 PRINT "YOUR AGE (IF BIRTHDATE) ",I5,I6,I7 870 LET A8 = (I5*365)+(I6*30)+I7+INT(I6/2) 880 LET K5 = I5 890 LET K6 = I6 900 LET K7 = I7 910 REM CALCULATE RETIREMENT DATE. 920 LET E = Y+65 930 REM CALCULATE TIME SPENT IN THE FOLLOWING FUNCTIONS. 940 LET F = .35 950 PRINT "YOU HAVE SLEPT ", 960 GOSUB 1370 970 LET F = .17 980 PRINT "YOU HAVE EATEN ", 990 GOSUB 1370 1000 LET F = .23 1010 IF K5 > 3 THEN 1040 1020 PRINT "YOU HAVE PLAYED", 1030 GOTO 1080 1040 IF K5 > 9 THEN 1070 1050 PRINT "YOU HAVE PLAYED/STUDIED", 1060 GOTO 1080 1070 PRINT "YOU HAVE WORKED/PLAYED", 1080 GOSUB 1370 1085 GOTO 1530 1090 PRINT "YOU HAVE RELAXED ",K5,K6,K7 1100 PRINT 1110 PRINT TAB(16);"*** YOU MAY RETIRE IN";E;" ***" 1120 PRINT 1140 PRINT 1200 PRINT 1210 PRINT 1220 PRINT 1230 PRINT 1240 END 1250 IF D=13 THEN 1280 1260 PRINT "FRIDAY." 1270 GOTO 710 1280 PRINT "FRIDAY THE THIRTEENTH---BEWARE!" 1290 GOTO 710 1300 PRINT "NOT PREPARED TO GIVE DAY OF WEEK PRIOR TO MDLXXXII. " 1310 GOTO 1140 1320 REM TABLE OF VALUES FOR THE MONTHS TO BE USED IN CALCULATIONS. 1330 DATA 0, 3, 3, 6, 1, 4, 6, 2, 5, 0, 3, 5 1340 REM THIS IS THE CURRENT DATE USED IN THE CALCULATIONS. 1350 REM THIS IS THE DATE TO BE CALCULATED ON. 1360 REM CALCULATE TIME IN YEARS, MONTHS, AND DAYS 1370 LET K1=INT(F*A8) 1380 LET I5 = INT(K1/365) 1390 LET K1 = K1- (I5*365) 1400 LET I6 = INT(K1/30) 1410 LET I7 = K1 -(I6*30) 1420 LET K5 = K5-I5 1430 LET K6 =K6-I6 1440 LET K7 = K7-I7 1450 IF K7>=0 THEN 1480 1460 LET K7=K7+30 1470 LET K6=K6-1 1480 IF K6>0 THEN 1510 1490 LET K6=K6+12 1500 LET K5=K5-1 1510 PRINT I5,I6,I7 1520 RETURN 1530 IF K6=12 THEN 1550 1540 GOTO 1090 1550 LET K5=K5+1 1560 LET K6=0 1570 GOTO 1090 1580 REM 1590 END 2 PRINT TAB(33);"WORD" 3 PRINT TAB(15);"CREATIVE COMPUTING MORRISTOWN, NEW JERSEY" 4 PRINT: PRINT: PRINT 5 DIM S(7),A(7),L(7),D(7),P(7) 10 PRINT "I AM THINKING OF A WORD -- YOU GUESS IT. I WILL GIVE YOU" 15 PRINT "CLUES TO HELP YOU GET IT. GOOD LUCK!!": PRINT: PRINT 20 REM 30 PRINT: PRINT: PRINT "YOU ARE STARTING A NEW GAME..." 35 RESTORE 40 READ N 50 C=INT(RND(1)*N+1) 60 FOR I=1 TO C 70 READ S$ 80 NEXT I 90 G=0 95 S(0)=LEN(S$) 100 FOR I=1 TO LEN(S$): S(I)=ASC(MID$(S$,I,1)): NEXT I 110 FOR I=1 TO 5 120 A(I)=45 130 NEXT I 140 FOR J=1 TO 5 144 P(J)=0 146 NEXT J 150 PRINT "GUESS A FIVE LETTER WORD"; 160 INPUT L$ 170 G=G+1 172 IF S$=G$ THEN 500 173 FOR I=1 TO 7: P(I)=0: NEXT I 175 L(0)=LEN(L$) 180 FOR I=1 TO LEN(L$): L(I)=ASC(MID$(L$,I,1)): NEXT I 190 IF L(1)=63 THEN 300 200 IF L(0)<>5 THEN 400 205 M=0: Q=1 210 FOR I=1 TO 5 220 FOR J=1 TO 5 230 IF S(I)<>L(J) THEN 260 231 P(Q)=L(J) 232 Q=Q+1 233 IF I<>J THEN 250 240 A(J)=L(J) 250 M=M+1 260 NEXT J 265 NEXT I 270 A(0)=5 272 P(0)=M 275 A$="": FOR I=1 TO A(0): A$=A$+CHR$(A(I)): NEXT I 277 P$="": FOR I=1 TO P(0): P$=P$+CHR$(P(I)): NEXT I 280 PRINT "THERE WERE";M;"MATCHES AND THE COMMON LETTERS WERE...";P$ 285 PRINT "FROM THE EXACT LETTER MATCHES, YOU KNOW................";A$ 286 IF A$=S$ THEN 500 287 IF M>1 THEN 289 288 PRINT: PRINT "IF YOU GIVE UP, TYPE '?' FOR YOUR NEXT GUESS." 289 PRINT 290 GOTO 150 300 S$="": FOR I=1 TO 7: S$=S$+CHR$(S(I)): NEXT I 310 PRINT "THE SECRET WORD IS ";S$: PRINT 320 GOTO 30 400 PRINT "YOU MUST GUESS A 5 LETTER WORD. START AGAIN." 410 PRINT: G=G-1: GOTO 150 500 PRINT "YOU HAVE GUESSED THE WORD. IT TOOK";G;"GUESSES!": PRINT 510 INPUT "WANT TO PLAY AGAIN";Q$ 520 IF Q$="YES" THEN 30 530 DATA 12,"DINKY","SMOKE","WATER","GRASS","TRAIN","MIGHT","FIRST" 540 DATA "CANDY","CHAMP","WOULD","CLUMP","DOPEY" 999 END