This is non-commercial site, its content is based on Atari 8-bit home computer contents and references.
If you feel your rights are violated by showing/using any part of contents of your product represented on this page,
please contact me immediatelly so I can remove it!
Entry name:
Richocet
|
Publisher/Developer:
BELLCOM - Public Domain Library (Software library) |
|
|
-
Entry name:Richocet
-
Category:Games
-
Publisher/Developer:BELLCOM - Public Domain Library
Listing 1
10 REM 20 REM 90 POKE 752,1:? "":SETCOLOR 1,10,2:SETCOLOR 2,10,14:SETCOLOR 4,10,14 100 DIM Q$(12),BOX(9,9):TIMER=300:SHOT=400:BOARD=600:LET GETMOVE=800:LET SOUND=1800 110 ? "":? "":?:? "a game of logic and deduction":?:? "Do you need instructions";:INPUT Q$ 120 IF Q$>"" THEN IF Q$(1,1)="Y" THEN GOSUB 5000 150 GOTO 1000 300 FOR TIME=1 TO T:NEXT TIME:RETURN 400 REM 410 X=0:Y=0:H=0:V=0:F=0:P=0 420 IF S<9 THEN X=S:V=1:GOTO 430 422 IF S<17 THEN X=9:Y=S-8:H=-1:GOTO 430 424 IF S<25 THEN X=25-S:Y=9:V=-1:GOTO 430 426 X=0:Y=33-S:H=1 430 X1=X:Y1=Y 435 IF BOX(X+H,Y+V)>5 THEN F=1:RETURN 436 REM 440 IF H<>-1 THEN 450 442 T1=BOX(X-1,Y-1):T2=BOX(X-1,Y+1) 443 IF T1>5 AND T2>5 THEN F=2:RETURN 444 IF T1>5 THEN H=0:V=1 446 IF T2>5 THEN H=0:V=-1 448 GOTO 500 450 IF H<>1 THEN 460 452 T1=BOX(X+1,Y-1):T2=BOX(X+1,Y+1) 453 IF T1>5 AND T2>5 THEN F=2:RETURN 454 IF T1>5 THEN H=0:V=1 456 IF T2>5 THEN H=0:V=-1 458 GOTO 500 460 IF V<>-1 THEN 470 462 T1=BOX(X-1,Y-1):T2=BOX(X+1,Y-1) 463 IF T1>5 AND T2>5 THEN F=2:RETURN 464 IF T1>5 THEN V=0:H=1 466 IF T2>5 THEN V=0:H=-1 468 GOTO 500 470 IF V<>1 THEN STOP 472 T1=BOX(X-1,Y+1):T2=BOX(X+1,Y+1) 473 IF T1>5 AND T2>5 THEN F=2:RETURN 474 IF T1>5 THEN V=0:H=1 476 IF T2>5 THEN V=0:H=-1 500 X=X+H:Y=Y+V 505 P=P+1 510 IF X<1 OR X>8 OR Y<1 OR Y>8 THEN 540 520 GOTO 435 540 FOR T=1 TO 10*(10-P):NEXT T 542 IF P=1 THEN F=2:RETURN 543 IF Y<1 THEN S1=X:RETURN 544 IF X>8 THEN S1=8+Y:RETURN 545 IF Y>8 THEN S1=25-X:RETURN 546 S1=33-Y:RETURN 600 GRAPHICS 0:SETCOLOR 1,13,14:SETCOLOR 2,13,14:SETCOLOR 4,13,2 620 ? " 1 2 3 4 5 6 7 8 |" 625 ? " | " 630 ? " |*=SHOT " 635 ? "32 | | | | | | | | | 9|REFLECTED" 640 ? " | " 645 ? "31 | | | | | | | | | 10|# =SHOT" 650 ? " |ABSORBED" 660 ? "30 | | | | | | | | | 11|" 665 ? " |" 670 ? "29 | | | | | | | | | 12|" 675 ? " |" 680 ? "28 | | | | | | | | | 13|" 685 ? " |" 690 ? "27 | | | | | | | | | 14|" 695 ? " |" 700 ? "26 | | | | | | | | | 15|" 705 ? " |" 710 ? "25 | | | | | | | | | 16|" 735 ? " |" 736 ? " |" 740 ? " 2 2 2 2 2 1 1 1 |" 750 ? " 4 3 2 1 0 9 8 7 |" 755 SETCOLOR 1,13,2:SETCOLOR 4,13,2 760 RETURN 800 POKE 752,1 805 POSITION 28,8:? "Type: " 810 POSITION 28,10:? "(1-32) " 815 POSITION 28,11:? " TO SHOOT " 820 POSITION 28,13:? " TO PLACE " 825 POSITION 28,14:? " A BALL " 830 POSITION 28,16:? " TO END " 835 POSITION 28,17:? " GAME AND " 840 POSITION 28,18:? " SCORE ";K 850 POSITION 28,21:? " Your move " 860 POSITION 28,22:? " ";:POSITION 28,22:INPUT Q$ 870 IF Q$="" THEN 860 875 M=0 880 IF Q$(1,1)="B" THEN M=2 890 IF Q$(1,1)="E" THEN M=3 895 IF M THEN 930 900 TRAP 860 910 IF VAL(Q$)>0 AND VAL(Q$)<33 THEN M=1:S=VAL(Q$) 915 TRAP 0 920 IF M=0 THEN ? CHR$(253);:GOTO 860 930 IF M<>2 THEN 980 931 GOSUB 980 932 POSITION 28,13:? "ADD (1)" 933 POSITION 28,14:? "REMOVE (2)" 934 TRAP 934:POSITION 28,15:? "A BALL";:INPUT Q:TRAP 0 935 IF Q<0 OR Q>2 THEN 931 936 POSITION 28,13 937 IF Q=1 THEN ? "ADD BALL AT" 938 IF Q=2 THEN ? "REMOVE FROM" 940 POSITION 28,14:? "COLUMN(1-8)" 945 POSITION 28,15:? " " 946 POSITION 28,15:INPUT C 947 IF C<1 OR C>8 THEN ? CHR$(253);:GOTO 945 950 POSITION 28,14:? "ROW (9-16) " 955 POSITION 28,15:? " " 957 POSITION 28,15:INPUT R 960 IF R<9 OR R>16 THEN ? CHR$(253);:GOTO 955 970 R=R-8 979 REM 980 FOR I=8 TO 23:POSITION 28,I:PRINT " ";:NEXT I:RETURN 1000 REM 1010 GOSUB BOARD 1020 GOSUB 3000 1030 GOSUB 2000 1040 REM 1050 GOSUB GETMOVE 1060 ON M GOTO 1100,1200,1300 1100 GOSUB SOUND:GOSUB SHOT 1110 POSITION 5+2*X1,1+2*Y1 1115 IF F=1 THEN ? "#":K=K+1:GOTO 1040 1120 IF F=2 THEN PRINT "*":K=K+1:GOTO 1040 1130 ? CHR$(65+J):POSITION 5+2*X,1+2*Y:? CHR$(65+J):J=J+1:K=K+2:GOTO 1040 1200 T=BOX(C,R) 1205 IF Q=1 AND T/10=INT(T/10) THEN BOX(C,R)=T+1:POSITION 5+2*C,1+2*R:? "0" 1210 IF Q=2 AND T/10<>INT(T/10) THEN BOX(C,R)=T-1:POSITION 5+2*C,1+2*R:? " "; 1299 GOTO 1040 1300 REM 1310 FOR I=1 TO 9:FOR J=1 TO 9 1320 T=BOX(I,J):IF T=0 THEN 1360 1330 IF T=1 THEN 1360 1340 IF T=10 THEN POSITION 5+2*I,1+2*J:? "":K=K+5 1350 IF T>10 THEN POSITION 5+2*I,1+2*J:? "H" 1360 NEXT J:NEXT I 1370 GOSUB 980:POSITION 28,10:? "SCORE: ";K 1380 POSITION 28,12 1390 IF K<10 THEN ? "PSYCHIC !!":GOTO 1460 1400 IF K<15 THEN ? "EXPERT !!":GOTO 1460 1410 IF K<18 THEN PRINT "PRO !!":GOTO 1460 1420 IF K<22 THEN ? "AVERAGE":GOTO 1460 1430 IF K<27 THEN ? "BEGINNER!":GOTO 1460 1440 ? "THE PITS!!!" 1460 POSITION 28,16:? "0= GUESS":POSITION 28,18:? "= TARGET":POSITION 28,20:? "H= HIT" 1480 POSITION 21,23:? "PLAY AGAIN";:INPUT Q$:IF Q$>"" THEN IF Q$(1,1)="N" THEN 1490 1485 RUN 1490 GRAPHICS 0:END 1800 SOUND 0,50+150*RND(0),10,8:T=30:GOSUB TIMER:SOUND 0,0,0,0:RETURN 2000 FOR T=1 TO 5 2010 I=INT(8*RND(0)+1):J=INT(8*RND(0)+1) 2020 IF BOX(I,J) THEN 2010 2030 BOX(I,J)=10 2040 NEXT T 2050 I=0:J=0:RETURN 3000 FOR I=0 TO 9:FOR J=0 TO 9:BOX(I,J)=0:NEXT J:NEXT I:RETURN 5000 REM 5010 PRINT "BLACKBOK":? 5020 ? "this puzzle will test you deductive":? "abilities. A box is placed before" 5030 ? "you. Inside are 64 compartments,":? "arranged as an 8x8 grid. In 5 of" 5040 ? "those compartments targets have been":? "placed. Your task is to deduce the" 5050 ? "locations of the targets without":? "being able to see inside the box.":? 5060 ? "To obtain clues, you can fire shots":? "horizontally into the sides of the" 5065 GOSUB 5900 5070 ? "box. If the shot doesn't hit any-":? "thing it will pass strait through" 5080 ? "and exit from the opposite side.":? "If it hits a target head on, the shot" 5090 ? "will be ABSORBED and will not exit.":? "If the shot passes within one com-" 5100 ? "partment of target it will be":? "DEFLECTED 90 degrees away from the" 5110 ? "target - in which case, if its new":? "path takes it toward another target" 5120 ? "it may be deflected again or absorbed" 5130 ? "by the second target.":? 5140 ? " If a shot would be deflected":? "before entering the box (by a target" 5150 ? "along the box's edge), it is ":? "REFLECTED back.":GOSUB 5900 5160 ? " In the following example.the ":? "targets and the path of the shots" 5170 ? "will be visible to help you under-":? "stand the rules.":GOSUB 5900 5180 GOSUB BOARD:POKE 752,1 5190 RESTORE 6000:T=4:GOSUB 5800 5200 T=800:GOSUB TIMER 5205 T=7:GOSUB 5800:T=1500:GOSUB TIMER 5210 T=6:GOSUB 5800:T=1500:GOSUB TIMER 5215 T=10:GOSUB 5800:T=1500:GOSUB TIMER 5220 T=5:GOSUB 5800:T=500:GOSUB TIMER 5225 GOSUB 5900 5230 GRAPHICS 0:SETCOLOR 1,10,2:SETCOLOR 2,10,14:SETCOLOR 4,10,14 5231 ? "Of course,when you play,you won't:":? "be able to see the targets or the" 5240 ? "paths of your shots. Instead,the":? "computer will display symbols at the" 5250 ? "These are the symbols:":? 5270 ? " A-Z = entry and exit points.":? 5280 ? " # = shot ABSORBED (no exit).":? 5290 ? " * = shot REFLECTED (entry and":? " exit points identical)":? 5295 ? " * = shot REFLECTED (before entry)" 5300 GOSUB 5900 5310 ? "At any time you may make a guess ":? "to the location of a target. Simply" 5320 ? "type 'B' and the computer will":? "display a ball at the specified point" 5330 ? "You may remove a ball the same way." 5340 ?:? "To fire a shot,type the number of":? "the entry point (1-32)" 5350 ?:? "To end the game and see the actual":? "locations of the targets,type ''" 5360 ? "You will receive a point for each":? "clue you received around the edge of" 5370 ? "the box, and 5 points for each":? "target that you did't find." 5380 ?:? "The lower your score, the better'":GOSUB 5900 5390 RETURN 5800 FOR I=1 TO T:READ X,Y,Q$:POSITION X,Y:? Q$:NEXT I:RETURN 5900 POSITION 23,23:? "Press RETURN. ";:INPUT Q$:? "":RETURN 6000 DATA 11,3,,11,9,,17,3,,17,7, 6005 DATA 13,1,*,23,5,<,21,5,<,19,5,<,19,5,>,21,5,>,23,5,* 6010 DATA 5,7,A,7,7,>,9,7,>,9,5,^,7,5,<,5,5,A 6020 DATA 13,19,B,13,17,^,13,15,^,13,13,^,13,11,^,15,11,>,17,11,>,19,11,>,21,11,>,23,11,B 6030 DATA 11,19,#,11,17,^,11,15,^,11,13,^,11,11,# 9999 END
References
Listing downloads
Downloads
Copyright holder
