Basketball

Developer(s): Bill Ferrebee
Date: 198x
Type: Program
Platform(s): TS 1000

Appears on

Assembled by Tim Ward from many sources. Contains programs 10211 – 10251.

Gallery

Basketball

Source Code

   1 REM "BASKETBALL" 1984           BILL FERREBEE                   749 HILL STREET NO. 6           PARKERSBURG, WV 26104           TO SAVE GOTO 9900
   2 RAND 
  10 DIM T$(2,8)
  11 DIM M(2)
  12 DIM P(2)
  13 DIM S(2)
  14 DIM X(2)
  15 FOR J=1 TO 2
  16 LET P(J)=0
  17 LET M(J)=0
  18 LET S(J)=0
  19 LET X(J)=0
  20 NEXT J
  30 GOTO 9000
 100 IF I=2 THEN GOTO 150
 110 PRINT AT 1,1;"% %Y%O%U%R% %S%H%O%T%:%                  "
 120 GOSUB 5200
 130 GOSUB 5400
 140 GOTO 200
 150 LET B=INT (RND*4)+1
 200 LET R=RND
 210 CLS 
 220 PRINT TAB 16-(INT (LEN X$+5)/2);X$;" SHOT:"
 230 LET S(I)=S(I)+1
 231 FOR J=1 TO 2
 232 IF S(J)=45 THEN GOTO 6700
 233 IF S(J)=90 THEN GOTO 6600
 234 NEXT J
 240 GOTO (300 AND B=1)+(400 AND B=2)+(500 AND B=3)+(600 AND B=4)+(700 AND B=5)
 300 PRINT TAB 9;"LONG JUMP SHOT"
 310 IF R<.28*C THEN GOSUB 5700
 315 IF R<.28*C THEN GOTO 350
 320 IF R>.9 THEN GOTO 800
 330 IF R<.5*C THEN GOSUB 6200
 335 IF R<.5*C THEN GOTO 350
 340 IF R<.89*C THEN GOSUB 6300
 350 GOTO 900
 400 PRINT TAB 9;"SHORT JUMP SHOT"
 410 IF R<.38*C THEN GOSUB 5700
 415 IF R<.38*C THEN GOTO 350
 420 GOTO 320
 500 PRINT TAB 14;"LAYUP"
 510 IF R<.43*C THEN GOSUB 5700
 515 IF R<.43*C THEN GOTO 350
 520 IF R>.94 THEN GOSUB 6350
 525 IF R>.94 THEN GOTO 350
 530 GOTO 320
 600 PRINT TAB 12;"HOOK SHOT"
 610 GOTO 410
 700 PRINT TAB 12;"SET SHOT"
 710 GOTO 510
 800 GOSUB 6100
 900 GOTO 100
5000 PRINT AT 21,3;"% %P%R%E%S%S% %A%N%Y% %K%E%Y% %T%O% %C%O%N%T%I%N%U%E% "
5001 FOR J=1 TO 2
5002 NEXT J
5005 PRINT AT 21,3;" PRESS ANY KEY TO CONTINUE "
5010 IF INKEY$="" THEN GOTO 5000
5020 CLS 
5030 RETURN 
5100 FOR J=1 TO 25
5110 NEXT J
5120 CLS 
5130 RETURN 
5200 PRINT 
5210 PRINT TAB 3;"% %1%  LONG (30 FT.) JUMP SHOT"
5211 PRINT TAB 3;"% %2%  SHORT (15 FT.) JUMP SHOT"
5212 PRINT TAB 3;"% %3%  LAYUP"
5213 PRINT TAB 3;"% %4%  HOOK SHOT"
5214 PRINT TAB 3;"% %5%  SET SHOT"
5215 PRINT TAB 3;"% %D%  TO CHANGE DEFENSES"
5216 PRINT TAB 3;"% %S%  TO VIEW SCORE"
5217 PRINT TAB 3;"% %P%  TO VIEW SHOOTING \ '/\. "
5220 PRINT 
5230 RETURN 
5295 PRINT AT 1,1;"% %N%E%W% %D%E%F%E%N%S%E%:"
5300 PRINT 
5310 PRINT TAB 3;"% %6%  PRESS"
5311 PRINT TAB 3;"% %7%  MAN-TO-MAN"
5312 PRINT TAB 3;"% %8%  ZONE"
5313 PRINT TAB 3;"% %9%  NONE"
5320 PRINT 
5330 RETURN 
5400 IF INKEY$="" THEN GOTO 5400
5405 LET A=CODE INKEY$
5410 IF A<29 OR A>33 AND A<>41 AND A<>53 AND A<>56 THEN GOTO 5400
5420 IF A>28 AND A<34 THEN LET B=A-28
5425 IF A>28 AND A<34 THEN RETURN 
5430 IF A=41 THEN GOSUB 7000
5440 IF A=53 THEN GOSUB 7100
5450 IF A=56 THEN GOSUB 7200
5460 GOTO 110
5470 RETURN 
5499 LET I=1
5500 IF INKEY$="" THEN GOTO 5500
5505 LET A=CODE INKEY$
5510 IF A<34 OR A>37 THEN GOTO 5500
5520 IF I=1 THEN LET C=(A/2-9)/7
5521 IF I=2 THEN LET C=(A/2-9)/8
5530 RETURN 
5600 PRINT 
5610 PRINT TAB 1;"% %S%C%O%R%E%:% "
5612 PRINT 
5615 PRINT TAB 8;T$(1);TAB 24;P(1)
5620 PRINT TAB 8;T$(2);TAB 24;P(2)
5630 PAUSE 90
5640 FOR J=1 TO 2
5650 NEXT J
5660 RETURN 
5700 PRINT TAB 10;"SHOT IS GOOD"
5710 IF B=1 THEN LET P(I)=P(I)+3
5715 IF B=1 THEN PRINT TAB 10;"THREE POINTS"
5720 IF B=1 THEN GOTO 5740
5730 LET P(I)=P(I)+2
5735 PRINT TAB 11;"TWO POINTS"
5740 LET M(I)=M(I)+1
5750 IF I=1 THEN GOTO 5765
5755 LET I=1
5760 GOTO 5770
5765 LET I=2
5770 GOSUB 5600
5771 GOSUB 6010
5775 GOSUB 5100
5780 RETURN 
5800 PRINT AT 9,9;"% %C%E%N%T%E%R% %J%U%M%P% "
5810 GOSUB 6000
5815 PRINT 
5820 PRINT TAB 16-(INT (LEN X$+13)/2);X$;" GETS THE TIP"
5830 PAUSE 90
5835 CLS 
5840 RETURN 
5880 GOSUB 5600
5890 RETURN 
5900 PRINT 
5910 PRINT TAB 1;"% %S%H%O%O%T%I%N%G% %P%E%R%C%E%N%T%A%G%E%:% "
5915 PRINT 
5920 FOR J=1 TO 2
5922 IF M(J)=0 OR S(J)=0 THEN LET X(J)=0
5924 IF M(J)=0 OR S(J)=0 THEN GOTO 5932
5930 LET X(J)=INT ((M(J)/S(J))*100)
5932 IF M(J)=0 OR S(J)=0 THEN LET M(J)=0
5940 PRINT TAB 8;T$(J);TAB 24;X(J);TAB 27;"\ '/\. "
5950 NEXT J
5955 IF S(1)=90 OR S(2)=90 THEN GOTO 5970
5960 GOSUB 5100
5970 RETURN 
6000 LET I=INT (RND*2)+1
6010 IF I=1 THEN LET X$=H$
6015 IF I=2 THEN LET X$=V$
6020 RETURN 
6100 PRINT TAB 16-(INT (LEN X$+17)/2);X$;" FOULED--TWO SHOTS"
6105 LET S(I)=S(I)-1
6110 IF RND<.5 THEN GOTO 6130
6115 IF RND<.75 THEN GOTO 6150
6120 PRINT TAB 7;"BOTH SHOTS MISSED"
6125 GOTO 6160
6130 PRINT TAB 8;"BOTH SHOTS MADE"
6135 LET P(I)=P(I)+2
6140 GOTO 6160
6150 PRINT TAB 6;"1 MADE AND 1 MISSED"
6155 LET P(I)=P(I)+1
6160 GOSUB 5750
6170 RETURN 
6200 PRINT TAB 10;"SHOT IS SHORT"
6210 GOSUB 6000
6220 IF I=1 THEN PRINT TAB 16-(INT (LEN X$+18)/2);X$;" RETRIEVES THE BALL"
6225 IF I=2 THEN PRINT TAB 16-(INT (LEN X$+14)/2);X$;" TAKES CONTROL"
6230 GOSUB 5100
6240 RETURN 
6300 PRINT TAB 6;"SHOT IS OFF THE RIM"
6310 GOSUB 6000
6320 PRINT TAB 16-(INT (LEN X$+17)/2);X$;" GETS THE REBOUND"
6330 GOSUB 5100
6340 RETURN 
6350 PRINT TAB 9;"SHOT IS BLOCKED"
6360 GOTO 6210
6400 GOSUB 5900
6405 PRINT AT 21,7;"% %P%L%A%Y% %A%G%A%I%N%?% %(%Y%/%N%)% "
6410 IF INKEY$="" THEN GOTO 6410
6420 IF INKEY$="N" THEN GOTO 6480
6430 IF INKEY$="Y" THEN GOTO 6450
6440 GOTO 6410
6450 CLEAR 
6451 CLS 
6452 DIM T$(2,8)
6453 DIM M(2)
6454 DIM P(2)
6455 DIM S(2)
6456 DIM X(2)
6460 FOR J=1 TO 2
6461 LET P(J)=0
6462 LET M(J)=0
6463 LET S(J)=0
6464 LET X(J)=0
6465 NEXT J
6470 GOTO 9180
6480 PRINT AT 21,0;"% % % % %T%H%A%N%K% % %Y%O%U% % %F%O%R% % %P%L%A%Y%I%N%G% % % % "
6485 STOP 
6500 PRINT AT 1,9;"% %S%E%C%O%N%D% %H%A%L%F% "
6510 GOSUB 5800
6520 RETURN 
6600 CLS 
6601 GOSUB 5600
6605 IF P(1)=P(2) THEN GOTO 6630
6610 PRINT AT 6,13;"% %F%I%N%A%L% "
6620 GOSUB 6400
6630 PRINT AT 6,11;"% %O%V%E%R%T%I%M%E% "
6635 FOR J=1 TO 2
6636 LET S(J)=85
6637 NEXT J
6640 GOSUB 5100
6645 PRINT AT 1,11;"% %O%V%E%R%T%I%M%E% "
6650 GOSUB 5800
6660 GOTO 100
6700 CLS 
6701 GOSUB 5600
6705 PRINT AT 6,11;"% %H%A%L%F%T%I%M%E% "
6710 GOSUB 5000
6715 GOSUB 6500
6720 LET S(1)=46
6721 LET S(2)=46
6730 GOTO 100
7000 CLS 
7010 GOSUB 5295
7020 GOSUB 5500
7030 RETURN 
7072 CLS 
7100 CLS 
7110 GOSUB 5900
7120 RETURN 
7200 CLS 
7210 GOSUB 5600
7220 RETURN 
9000 FOR J=0 TO 9
9002 PRINT AT J,12;"        "
9004 PRINT AT J+1,12;"STRATEGY"
9006 NEXT J
9010 FOR J=1 TO 9
9012 PRINT AT 10-J,12-J;"STRATEGY"
9014 NEXT J
9020 PRINT AT 10,11;"% %S%T%R%A%T%E%G%Y% "
9030 FOR J=21 TO 12 STEP -1
9032 PRINT AT J,11;"          "
9034 PRINT AT J-1,11;"BASKETBALL"
9036 NEXT J
9040 FOR J=1 TO 9
9042 PRINT AT 11+J,11+J;"BASKETBALL"
9044 NEXT J
9050 PRINT AT 11,10;"% %B%A%S%K%E%T%B%A%L%L% "
9060 LET Z$="                               % % %M%O%U%N%T%A%I%N%E%E%R% % %S%O%F%T%W%A%R%E% % % %1%9%8%4% % "
9061 FOR J=1 TO 32
9062 PRINT AT 21,0;Z$( TO 32)
9063 LET Z$=Z$(2 TO LEN Z$)+Z$(1)
9064 NEXT J
9070 PRINT AT 0,0;"\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##\##"
9071 FOR J=1 TO 20
9072 PRINT AT J,0;"\##"
9073 PRINT AT J,31;"\##"
9074 NEXT J
9080 PAUSE 180
9090 CLS 
9100 PRINT 
9102 PRINT TAB 4;"IN % %S%T%R%A%T%E%G%Y% %B%A%S%K%E%T%B%A%L%L% ,"
9104 PRINT "YOU WILL TEST YOUR COACHING"
9106 PRINT "SKILLS AGAINST THE COMPUTER."
9110 PRINT 
9120 PRINT TAB 4;"HERE ARE THE OFFENSIVE PLAYS"
9122 PRINT "AVAILABLE:"
9130 GOSUB 5200
9140 GOSUB 5000
9150 PRINT 
9152 PRINT TAB 4;"BOTH TEAMS WILL USE THE"
9154 PRINT "DEFENSE YOU CHOOSE."
9160 PRINT 
9170 PRINT TAB 4;"YOUR OPTIONS ARE:"
9180 GOSUB 5300
9182 PRINT AT 21,4;"% %C%H%O%O%S%E% %Y%O%U%R% %D%E%F%E%N%S%E% "
9184 GOSUB 5499
9190 GOSUB 5000
9200 PRINT 
9202 PRINT "NAME OF HOME TEAM:"
9204 PRINT AT 4,5;"(MAXIMUM OF 8 LETTERS)"
9206 INPUT H$
9208 IF LEN H$>8 THEN GOTO 9206
9210 PRINT AT 1,23;H$
9212 LET T$(1)=H$
9214 PRINT "NAME OF VISITING TEAM:"
9216 INPUT V$
9218 IF LEN V$>8 THEN GOTO 9206
9220 PRINT AT 2,23;V$
9222 LET T$(2)=V$
9230 GOSUB 5100
9240 PRINT AT 1,10;"% %F%I%R%S%T% %H%A%L%F% "
9250 GOSUB 5800
9260 GOTO 100
9900 SAVE "1024%0"
9910 RUN 
Scroll to Top