10 PRINT TAB(26);"SMASH" 20 PRINT TAB(20);"CREATIVE COMPUTING" 30 PRINT TAB(18);"MORRISTOWN, NEW JERSEY" 40 PRINT:PRINT:PRINT 50 DIM A(7),J(6) 70 PRINT"DO YOU NEED INSTRUCTIONS"; 80 INPUT Z$ 90 PRINT 100 FOR X=1 TO 7:READ A(X):NEXT X 105 FOR X=1 TO 6:READ J(X):NEXT X 120 IF LEFT$(Z$,1)="N" THEN 350 130 PRINT"THIS IS SMASH--THE GAME THAT SIMULATES A CAR RACE." 140 PRINT"YOU WILL RESPOND WITH ONE OF THE FOLLOWING MANUEVERS" 150 PRINT "WHEN A '?' IS TYPED. THE POSITION NUMBERS REFER TO THE" 160 PRINT"POINT AT WHICH YOU ARE ON THE TRACK-THEY GO AS FOLLOWS:" 170 PRINT 180 PRINT " 1-THE START LINE" 190 PRINT " 2-MID STRAIGHT-AWAY" 200 PRINT " 3-COMING UP ON A LEFT TURN" 210 PRINT " 4-MID LEFT TURN" 220 PRINT " 5-COMING UP ON A RIGHT TURN" 230 PRINT " 6-MID-RIGHT TURN" 240 PRINT " 7-THE FINISH LINE" 250 PRINT 260 PRINT" MANEUVERS" 270 PRINT" 1-FLOOR IT" 280 PRINT" 2-ACCELERATE(MODERATE)" 290 PRINT" 3-BRAKE SLIGHT" 300 PRINT" 4-JAM ON THE BRAKES" 310 PRINT" 5-SHARP RIGHT" 320 PRINT" 6-MODERATE RIGHT" 330 PRINT" 7-SHARP LEFT" 340 PRINT" 8-MODERATE LEFT" 350 PRINT 360 PRINT"TIME(SEC)","MILES TO GO","M.P.H.","POSITION","MOVE" 370 LET A=INT(10+RND(1)*5):Y=A 380 LET B=O:T=O 390 LET C=1 400 GOTO 420 410 LET C=(INT(2+RND(1)*5)) 420 PRINT T,A,B,C, 430 INPUT D 440 IF D<>INT(D) THEN 470 450 IF D>8 THEN 470 460 IF D>=1 THEN 490 470 PRINT"ONE THRU EIGHT ONLY" 480 GOTO 420 490 IF D<>1 THEN 510 500 LET B=3*B+20+INT(10+RND(1)*91)/10 510 IF D<>2 THEN 530 520 LET B=3*B/2+7+INT(10+RND(1)*61)/10 530 IF D<>3 THEN 550 540 LET B=7*B/8-6+INT(10+RND(1)*41)/10 550 IF D<>4 THEN 570 560 LET B=4*B/7-26+INT(10+RND(1)*81)/10 570 IF D=7 THEN 590 580 IF D<>5 THEN 600 590 LET B=9*B/10*(.7+RND(1)*.6) 600 IF D=8 THEN 620 610 IF D<>6 THEN 630 620 LET B=13*B/14*(.7+RND(1)*.6) 630 IF B>0 THEN 650 640 LET B=0 650 IF A-B/120>0 THEN 730 660 LET T=T+A*3600/B 670 PRINT T,0,B,7 680 PRINT"THAT ENDS THE RACE, YOU PLACED #"INT(T/(20*Y)+.5) 690 PRINT"YOUR AVERAGE SPEED WAS"Y*3600/T"M.P.H." 700 IF INT(T/(20*Y)+.5)<>1 THEN 980 710 PRINT"THAT WAS A PERFECT RACE, CHAMP!" 720 GOTO 980 730 IF C<>2 THEN 760 740 IF D=7 THEN 960 750 IF D=5 THEN 960 760 IF C=3 THEN 780 770 IF C<>4 THEN 800 780 IF D=5 THEN 960 790 IF D=6 THEN 960 800 IF C=6 THEN 820 810 IF C<>5 THEN 840 820 IF D=7 THEN 960 830 IF D=8 THEN 960 840 IF B>J(C) THEN 970 850 IF INT(1+RND(0)*77)<>40 THEN 880 860 PRINT"SMASH--YOU HAVE BEEN HIT BY ANOTHER CAR!!" 870 GOTO 980 880 LET T=T+30 890 LET A=A-B/120 900 IF C=1 THEN 410 910 IF C=4 THEN 410 920 IF C-2 THEN 410 930 IF C=6 THEN 410 940 LET C=C+1 950 GOTO 420 960 PRINT"BAD MOVE!" 970 PRINT "SMASH--YOU WENT RIGHT INTO THE WALL!" 980 PRINT"DO YOU WANT TO PLAY AGAIN"; 990 INPUT Z$ 1000 IF LEFT$(Z$,1)="Y" THEN 350 1020 DATA 2,3,5,2,3,5,2,200,240,180,170,180,170 1030 END