0 TEXT

    3 CALL -936

    5 VTAB 2

   10 TAB 6

   20 FOR I=1 TO 8

   30 PRINT "  ";I;

   40 NEXT I

   45 PRINT

   50 FOR I=9 TO 16

   60 TAB 5: PRINT 41-I;: TAB 33:

       PRINT I

   65 IF I#16 THEN PRINT

   70 NEXT I

   71 POKE 50,127: FOR J=3 TO 17 STEP

      2: VTAB J

   72 FOR I=8 TO 29 STEP 3: TAB I:

       PRINT "  ";: NEXT I,J: POKE

      50,255

   75 TAB 7: VTAB 19

   80 FOR I=1 TO 8: PRINT " ";25-

      I;: NEXT I

   82 PRINT

   85 PRINT : PRINT "*****************

      ***********************"

   90 POKE 34,21

  500 DIM A$(3)

  510 DIM PLAC(5)

 1000 DIM PLACE(5)

 1005 DIM PLA(5)

 1010 FOR I=1 TO 5

 1020 A= RND (63)

 1030 FOR J=1 TO I: IF PLACE(J)=A THEN

      1020: NEXT J

 1040 PLACE(I)=A

 1050 NEXT I

 1060 FOR I=1 TO 5:PLA(I)=PLACE(I)

      +1: NEXT I

 1070 GOTO 2000

 1100 POKE 34,2: POKE 35,18: POKE

      32,7: POKE 33,25: CALL -936

      

 1110 FOR I=1 TO 5

 1115 TAB 1

 1120 TAB 1+3*(PLACE(I) MOD 8)

 1130 VTAB ((PLACE(I))/8)*2+3: PRINT

      "#"

 1140 NEXT I

 1150 POKE 34,21: VTAB 22

 1160 POKE 32,0: POKE 33,39

 1165 POKE 35,23

 1170 RETURN

 2000 INPUT "ENTER NUMBER WHERE RAY IS

       ENTERING",RAY

 2005 IF RAY<1 OR RAY>32 THEN 9000

      

 2010 TRY=TRY+1

 2100 IF RAY>16 THEN 2120

 2105 VLOC=RAY-8

 2107 HLOC=RAY

 2110 IF RAY<10 THEN VLOC=1

 2112 IF RAY>7 THEN HLOC=8

 2115 GOTO 2150

 2120 VLOC=33-RAY

 2125 IF RAY<25 THEN VLOC=8

 2130 HLOC=25-RAY

 2135 IF RAY>24 THEN HLOC=1

 2150 DIR=(RAY+7)/8

 2200 LOC=(VLOC-1)*8+HLOC

 2210 GOSUB 3000

 2215 FOR I=1 TO 2000- RND (500):

       NEXT I

 2220 GOTO DIR*1000+4000

 3000 POKE 34,1: VTAB 1: TAB 1

 3010 IF RAY<9 THEN 3100

 3020 IF RAY<17 THEN 3200

 3030 IF RAY<25 THEN 3300

 3040 GOTO 3400

 3100 TAB 8+3*(RAY-1): GOTO 3110+

      H*10

 3110 PRINT TRY

 3115 GOTO 3900

 3120 PRINT A$

 3150 GOTO 3900

 3200 VTAB 3+(RAY-9)*2: TAB 38: GOTO

      3210+H*10

 3210 PRINT TRY

 3215 GOTO 3900

 3220 PRINT A$

 3290 GOTO 3900

 3300 VTAB 20: TAB 5+3*(25-RAY): GOTO

      3310+H*10

 3310 PRINT TRY

 3315 GOTO 3900

 3320 PRINT A$

 3390 GOTO 3900

 3400 VTAB 1+(33-RAY)*2: TAB 3: GOTO

      3410+H*10

 3410 PRINT TRY

 3415 GOTO 3900

 3420 PRINT A$

 3900 POKE 34,21: CALL -936

 3910 H=0

 3990 RETURN

 4000 IF LOC>64 THEN 5400

 4005 GOTO 5005

 4010 IF LOC MOD 8=0 THEN 6300

 4015 GOTO 6010

 4020 IF LOC<1 THEN 7300

 4025 GOTO 7010

 4030 IF LOC MOD 8=1 THEN 8300

 4035 GOTO 8010

 5000 K=0

 5005 L=0:R=0

 5009 FOR I=1 TO 5

 5010 IF PLA(I)=LOC THEN 11000

 5015 NEXT I

 5017 FOR I=1 TO 5

 5020 IF LOC MOD 8=1 THEN 5035

 5030 IF PLA(I)=LOC-1 THEN L=1

 5035 IF LOC MOD 8=0 THEN 5050

 5040 IF PLA(I)=LOC+1 THEN R=1

 5050 IF L=1 AND R=1 THEN 10000

 5065 IF K=0 AND (R=1 OR L=1) THEN

      10000

 5070 NEXT I

 5080 IF L=1 OR R=1 THEN 5200

 5100 LOC=LOC+8

 5105 IF LOC>64 THEN 5400

 5107 K=K+1

 5110 GOTO 5005

 5200 IF R=1 THEN 5300

 5205 DIR=4

 5220 LOC=LOC-7: GOTO 4030

 5300 DIR=2:LOC=LOC-9: GOTO 4010

 5400 RAY=89-LOC

 5410 GOSUB 3000

 5420 GOTO 2000

 6000 K=0

 6010 L=0:R=0

 6020 FOR I=1 TO 5

 6030 IF PLA(I)=LOC THEN 11000

 6040 NEXT I

 6050 FOR I=1 TO 5

 6060 IF (LOC-1)/8=0 THEN 6080

 6070 IF PLA(I)=LOC-8 THEN L=1

 6080 IF (LOC-1)/8=7 THEN 6100

 6090 IF PLA(I)=LOC+8 THEN R=1

 6100 IF L=1 AND R=1 THEN 10000

 6110 IF K=0 AND (R=1 OR L=1) THEN

      10000

 6120 NEXT I

 6130 IF L=1 OR R=1 THEN 6200

 6140 LOC=LOC-1

 6160 IF LOC MOD 8=0 THEN 6300

 6170 K=K+1

 6180 GOTO 6010

 6190 PRINT

 6200 IF R=1 THEN 6220

 6210 DIR=1:LOC=LOC+9: GOTO 4000

 6220 DIR=3:LOC=LOC-7: GOTO 4020

 6300 RAY=32-(LOC+1)/8

 6310 GOSUB 3000

 6320 GOTO 2000

 7000 K=0

 7010 L=0:R=0

 7020 FOR I=1 TO 5

 7030 IF PLA(I)=LOC THEN 11000

 7040 NEXT I

 7050 FOR I=1 TO 5

 7060 IF LOC MOD 8=0 THEN 7080

 7070 IF PLA(I)=LOC+1 THEN L=1

 7080 IF LOC MOD 8=1 THEN 7100

 7090 IF PLA(I)=LOC-1 THEN R=1

 7100 IF L=1 AND R=1 THEN 10000

 7110 IF K=0 AND (R=1 OR L=1) THEN

      10000

 7120 NEXT I

 7130 IF L=1 OR R=1 THEN 7200

 7140 LOC=LOC-8

 7150 PRINT

 7160 IF LOC<1 THEN 7300

 7170 K=K+1

 7180 GOTO 7010

 7190 PRINT

 7200 IF R=1 THEN 7220

 7210 DIR=2:LOC=LOC+7: GOTO 4010

 7220 DIR=4:LOC=LOC+9: GOTO 4030

 7300 RAY=LOC+8

 7310 GOSUB 3000

 7320 GOTO 2000

 8000 K=0

 8010 L=0:R=0

 8020 FOR I=1 TO 5

 8030 IF PLA(I)=LOC THEN 11000

 8040 NEXT I

 8050 FOR I=1 TO 5

 8060 IF (LOC+1)/8>6 THEN 8080

 8070 IF PLA(I)=LOC+8 THEN L=1

 8080 IF (LOC-1)/8=0 THEN 8100

 8090 IF PLA(I)=LOC-8 THEN R=1

 8100 IF L=1 AND R=1 THEN 10000

 8110 IF K=0 AND (R=1 OR L=1) THEN

      10000

 8120 NEXT I

 8130 IF L=1 OR R=1 THEN 8200

 8140 LOC=LOC+1

 8150 PRINT

 8160 IF LOC MOD 8=1 THEN 8300

 8170 K=K+1

 8180 GOTO 8010

 8190 PRINT

 8200 IF R=1 THEN 8220

 8210 DIR=3:LOC=LOC-9: GOTO 4020

 8220 DIR=1:LOC=LOC+7: GOTO 4000

 8300 RAY=LOC/8+8

 8310 GOSUB 3000

 8320 GOTO 2000

 9000 INPUT "ENTER A 'Y' IF YOU WISH T

      O GUESS",A$

 9010 IF A$#"Y" THEN 2000

 9015 GOSUB 9500

 9020 PRINT "ENTER THE NUMBER VALUE OF

       EACH PLACE    YOU THINK THERE I

      S A BALL."

 9030 INPUT PLAC(1),PLAC(2),PLAC(

      3),PLAC(4),PLAC(5)

 9040 PRINT : PRINT : PRINT ""

 9050 FOR I=1 TO 5

 9060 FOR J=1 TO 5: IF PLA(I)=PLAC(

      J) THEN 9090

 9070 NEXT J

 9080 TRY=TRY+5

 9090 NEXT I

 9095 VTAB 22

 9100 PRINT "YOUR SCORE IS ";TRY;

      " TRIES"

 9110 GOSUB 1100

 9120 GOTO 32766

 9500 POKE 50,127

 9510 FOR I=3 TO 17 STEP 2

 9520 FOR J=8 TO 29 STEP 3

 9530 VTAB I: TAB J: PRINT (I-3)*

      4+J/3-1

 9540 NEXT J,I

 9550 CALL -936

 9560 POKE 50,255

 9590 RETURN

 9990 GOTO 32766

10000 PRINT "REFLECTION":A$="R ":

      H=1: GOSUB 3000: GOTO 2000

11000 PRINT "HIT":A$="H ":H=1: GOSUB

      3000: GOTO 2000

32000 FOR I=1 TO 5: PRINT PLA(I):

       NEXT I

32766 END

32767 END