Tajemnice ATARI

GOLF

    Zasady golfa są dziecinnie proste. Należy trafić piłką do dziury uderzając jak najmniejszą liczbę razy. Uwaga: gra w rzeczywistości stanowi skrzyżowanie golfa z bilardem. Piłka nie wypada na "out", lecz odbija się od brzegów pola.

    Klawiszami "+" i "*" ustawia się "celownik". Cyframi od 1 do 9 wykonuje się uderzenie z różną siłą.

9 REM Liczba i imiona graczy
10 OPEN #1,4,0,"K:"
11 DIM Z$(100),A$(30),S(10)
15 GRAPHICS 0:PRINT "              ATA
RI GOLF              "
20 FOR A=1 TO 100:Z$(A)=" ":NEXT A
25 FOR A=1 TO 10:S(A)=0:NEXT A
30 PRINT :PRINT :PRINT "PODAJ LICZBE G
RACZY (1-10)";:INPUT NP:IF NP>10 OR NP
<1 THEN 10
32 FOR A=1 TO NP:S(NP)=0:PRINT "IMIE G
RACZA ";A;:INPUT A$:IF LEN(A$)>10 THEN
 A$=A$(1,10)
33 IF LEN(A$)=0 THEN A$=" "
34 Z$(A*10-LEN(A$)+1,A*10)=A$:NEXT A:G
RAPHICS 5:POKE 752,1
38 SETCOLOR 0,0,0:SETCOLOR 4,2,6:GOTO 
300
39 REM Tablica wynikow
40 GRAPHICS 0:POKE 752,1:PRINT "   PUN
KTY KARNE:":PRINT :FOR A=1 TO NP:PRINT
 Z$(A*10-9,A*10),S(A):NEXT A
41 POKE 764,255
42 PRINT :PRINT "NACISNIJ KLAWISZ":GET
 #1,A:GRAPHICS 5:POKE 752,1:SETCOLOR 0
,0,0:SETCOLOR 4,3,10
43 SETCOLOR 4,2,6:RETURN 
49 REM Czytanie klawiatury
50 GET #1,Z:IF Z<58 AND Z>48 THEN HH=(
Z-48)*11:HM=0:VM=0:COLOR A:PLOT C1,C2:
GOTO 200
60 T=0:IF Z<>43 THEN 70
62 CP=CP+1:IF CP=17 THEN CP=1
64 COLOR A:PLOT C1,C2:GOTO 100
70 IF Z<>42 THEN GOTO 50
72 CP=CP-1:IF CP=0 THEN CP=16
74 COLOR A:PLOT C1,C2:GOTO 100
90 COLOR 1:PLOT HP1,HP2:PLOT HP1+1,HP2
92 COLOR 3:PLOT B1,B2:LOCATE C1,C2,A:I
F A<>2 THEN COLOR 2:PLOT C1,C2:GOTO 50
94 COLOR 3:PLOT C1,C2:GOTO 50
100 GOTO CP+100
101 C1=B1:C2=B2+2:M1=0:M2=-1:GOTO 90
102 C1=B1+1:M1=-1:GOTO 90
103 C1=B1+2:C2=B2+2:M1=-2:GOTO 90
104 C2=B2+1:M2=-0.5:GOTO 90
105 C2=B2:M2=0:GOTO 90
106 C2=B2-1:M2=0.5:GOTO 90
107 C1=B1+2:C2=B2-2:M1=-2:M2=1:GOTO 90
108 C1=B1+1:M1=-1:GOTO 90
109 C1=B1:M1=0:GOTO 90
110 C1=B1-1:M1=1:GOTO 90
111 C1=B1-2:C2=B2-2:M1=2:M2=1:GOTO 90
112 C2=B2-1:M2=0.5:GOTO 90
113 C2=B2:M2=0:GOTO 90
114 C2=B2+1:M2=-0.5:GOTO 90
115 C1=B1-2:C2=B2+2:M1=2:M2=-1:GOTO 90
116 C1=B1-1:M1=1:GOTO 90
150 COLOR 3:PLOT HP1,HP2:PLOT HP1+1,HP
2:IF S>1 THEN GOTO 156
151 REM Trafiony za pierwszym razem
152 PRINT "JESTES NIESAMOWITY !":FOR A
=1 TO 5:FOR B=1 TO 59:SETCOLOR 4,B/4+1
,14:SOUND 0,B,0,10:NEXT B:NEXT A
154 SETCOLOR 4,3,10:SOUND 0,0,0,0:GOTO
 158
155 REM Trafiony po S uderzeniach
156 PRINT "TRAFILES W ";S;" UDERZENIAC
H":FOR A=1 TO 50:SOUND 0,A,10,10:NEXT 
A:FOR A=49 TO 2 STEP -1
157 SOUND 0,A,10,10:NEXT A:SOUND 0,0,0
,0
158 FOR A=1 TO 700:NEXT A:PRINT CHR$(2
8);"                                  
":PRINT CHR$(28);CHR$(28);:RETURN 
200 D1=B1:D2=B2:COLOR 2:PLOT B1,B2:IF 
(ABS(M1)=1 AND HM=1) OR ABS(M1)=2 THEN
 GOTO 204
202 HM=1:GOTO 210
204 D1=B1+SGN(M1):HM=0
205 T=T+1:IF T>4 THEN RC=2:RETURN 
210 SOUND 0,200,10,10:SOUND 0,0,0,0:LO
CATE D1,B2,A:IF A=0 THEN RC=0:RETURN 
211 IF (D1<>HP1 AND D1<>HP1+1) OR D2<>
HP2 THEN IF A=1 THEN RC=0:RETURN 
212 COLOR 2:PLOT D1,B2:B1=D1:LOCATE HP
1,HP2,A:IF A<>1 THEN S(PT)=S(PT)+S-P:R
C=1:GOSUB 150:RETURN 
214 LOCATE HP1+1,HP2,A:IF A<>1 THEN S(
PT)=S(PT)+S-P:RC=1:GOSUB 150:RETURN 
220 COLOR 2:PLOT B1,B2:IF (ABS(M2)=0.5
 AND VM=1) OR ABS(M2)=1 THEN D2=B2+SGN
(M2):VM=0:GOTO 230
222 VM=1
230 LOCATE B1,D2,A:IF A=0 THEN RC=0:RE
TURN 
231 IF (D1<>HP1 AND D1<>HP1+1) OR D2<>
HP2 THEN IF A=1 THEN RC=0:RETURN 
232 COLOR 3:PLOT B1,D2:B2=D2:LOCATE HP
1,HP2,A:IF A=3 THEN S(PT)=S(PT)+S-P:RC
=1:GOSUB 150:RETURN 
234 LOCATE HP1+1,HP2,A:IF A=3 THEN S(P
T)=S(PT)+S-P:RC=1:GOSUB 150:RETURN 
240 T=0:HH=HH-1:IF HH<0 THEN RC=2:RETU
RN 
242 GOTO 200
299 REM Pierwsze pole gry
300 COLOR 2:FOR A=3 TO 36:PLOT 27,A:DR
AWTO 45,A:NEXT A:PRINT "  PILKA # 1   
2 UDERZENIA"
302 P=2:FOR PT=1 TO NP:S=1:PRINT Z$(PT
*10-9,PT*10);" uderza":B1=INT(RND(0)*1
1+32):B2=31:CP=1
304 HP1=35:HP2=6
305 GOSUB 100
310 IF RC=2 THEN S=S+1:CP=1:GOSUB 100:
GOTO 310
320 IF RC=1 THEN NEXT PT:GOTO 400
325 GOSUB 3000
330 IF D1=26 OR D1=46 THEN M1=-M1:GOSU
B 200:GOTO 310
332 M2=-M2:GOSUB 200:GOTO 310
399 REM Drugie pole gry
400 GOSUB 40:COLOR 2:FOR A=13 TO 36:PL
OT 27,A:DRAWTO 45,A:NEXT A:FOR A=0 TO 
11:PLOT 27+A,13-A:DRAWTO 70,13-A
402 NEXT A:PRINT "  PILKA # 2   2 UDER
ZENIA":FOR PT=1 TO NP:S=1:PRINT Z$(PT*
10-9,PT*10);" uderza"
404 HP1=60:HP2=8:B1=INT(RND(0)*11+32):
B2=31
405 CP=1:GOSUB 100
420 IF RC=2 THEN S=S+1:CP=1:GOSUB 100:
GOTO 420
430 IF RC=1 THEN NEXT PT:GOTO 500
435 GOSUB 3000
440 IF D2=1 OR D2=37 OR (D2=14 AND D1>
45) THEN M2=-M2:GOSUB 200:GOTO 420
442 IF D1<27 OR D1=46 OR D1=71 THEN M1
=-M1:GOSUB 200:GOTO 420
444 A=M1:M1=-M2*2:M2=-A/2:GOSUB 200:GO
TO 420
499 REM Trzecie pole gry
500 GOSUB 40:COLOR 2:FOR A=13 TO 36:PL
OT 17,A:DRAWTO 55,A:NEXT A:FOR A=0 TO 
11:PLOT 17+A,13-A:DRAWTO 55-A,13-A
502 NEXT A:COLOR 1:PLOT 36,10:DRAWTO 3
6,36
510 PRINT "  PILKA # 3   2 UDERZENIA":
FOR PT=1 TO NP:PRINT Z$(PT*10-9,PT*10)
;" uderza":B1=INT(RND(0)*11+42)
512 S=1:B2=32:CP=1:HP1=25:HP2=32:GOSUB
 100
520 IF RC=2 THEN S=S+1:CP=1:GOSUB 100:
GOTO 520
530 IF RC=1 THEN NEXT PT:GOTO 600
540 GOSUB 3000
550 IF D2=1 OR D2=37 THEN M2=-M2:GOSUB
 200:GOTO 520
552 IF D1=16 OR D1=36 OR D1=56 THEN M1
=-M1:GOSUB 200:GOTO 520
554 IF D1<36 THEN A=M1:M1=-M2*2:M2=-A/
2:GOSUB 200:GOTO 520
556 A=M1:M1=M2*2:M2=A/2:GOSUB 200:GOTO
 520
599 REM Czwarte pole gry
600 GOSUB 40:COLOR 2:FOR A=13 TO 24:PL
OT 21,A:DRAWTO 63,A:NEXT A:FOR A=25 TO
 36:PLOT 21,A:DRAWTO 35,A:NEXT A
602 FOR A=1 TO 8:PLOT 36+A,24+A:DRAWTO
 63-A,24+A:PLOT 21+A,13-A:DRAWTO 63-A,
24+A:PLOT 21+A,13-A:DRAWTO 63-A,13-A:N
EXT A
604 COLOR 1:PLOT 36,25:DRAWTO 36,14:DR
AWTO 51,14:PLOT 51,14:DRAWTO 51,14
610 P=3:PRINT "  PILKA # 4   3 UDERZEN
IA":FOR PT=1 TO NP:PRINT Z$(PT*10-9,PT
*10);" uderza":B1=INT(RND(0)*8)+20
615 S=1:B2=32:CP=1:HP1=43:HP2=19:GOSUB
 100
620 IF RC=2 THEN S=S+1:CP=1:GOSUB 100:
GOTO 620
630 IF RC=1 THEN NEXT PT:GOTO 700
640 GOSUB 3000
650 IF D2=4 OR D2=12 OR D2=37 OR (D2=3
3 AND D1>44 AND D1<55) OR (D2=14 AND D
1>36) THEN GOTO 654
652 GOTO 656
654 M2=-M2:GOSUB 200:GOTO 620
656 IF D1=20 OR D1=49 OR D1=51 OR D1=6
4 OR D1=36 THEN M1=-M1:GOSUB 200:GOTO 
620
658 IF (D1>56 AND D2<13) OR (D2>24 AND
 D1<57) THEN A=M1:M1=M2*2:M2=A/2:GOSUB
 200:GOTO 620
659 A=M1:M1=-M2*2:M2=-A/2
660 GOSUB 200:GOTO 620
699 REM Piate pole gry
700 GOSUB 40:COLOR 2:FOR A=25 TO 36:PL
OT 41,A:DRAWTO 55,A:NEXT A:FOR A=1 TO 
9:PLOT 33-A,25-A:DRAWTO 55,25-A
702 PLOT 24+A,11-A:DRAWTO 55-A,11-A:NE
XT A:FOR A=1 TO 5:PLOT 24,16-A:DRAWTO 
55,16-A:NEXT A
704 COLOR 1:FOR A=1 TO 2:PLOT 55,25-A:
DRAWTO 45,15-A:NEXT A
710 PRINT "  PILKA # 5   2 UDERZENIA":
P=2:FOR PT=1 TO NP:S=1:PRINT Z$(PT*10-
9,PT*10);" uderza":CP=1
715 B1=INT(RND(0)*8)+43:B2=33:HP1=33:H
P2=13:GOSUB 100
720 IF RC=2 THEN S=S+1:CP=1:GOSUB 100:
GOTO 720
730 IF RC=1 THEN NEXT PT:GOTO 800
740 GOSUB 3000
750 IF D2=1 OR D2=37 OR (D2=25 AND D1<
41) THEN M2=-M2:GOSUB 200:GOTO 720
752 IF D1=23 OR D1=40 OR D1=56 THEN M1
=-M1:GOSUB 200:GOTO 720
754 IF D1<40 AND D2<11 THEN A=M1:M1=-M
2*2:M2=-A/2:GOSUB 200:GOTO 720
756 A=M1:M1=M2*2:M2=A/2:GOSUB 200:GOTO
 720
799 REM Szoste pole gry
800 GOSUB 40:COLOR 2:FOR A=25 TO 36:PL
OT 31,A:DRAWTO 45,A:NEXT A:FOR A=1 TO 
11:PLOT 31,25-A:DRAWTO 51+A,25-A
801 NEXT A
802 FOR A=2 TO 13:PLOT 31,A:DRAWTO 62,
A:NEXT A:COLOR 1:FOR A=1 TO 2:PLOT 30+
A,24:DRAWTO 39+A,15:NEXT A
804 PLOT 41,15:DRAWTO 41,10:PLOT 49,10
:DRAWTO 49,4
810 PRINT "  PILKA # 6   3 UDERZENIA":
P=3:FOR PT=1 TO NP:S=1:PRINT Z$(PT*10-
9,PT*10);" uderza"
815 B1=INT(RND(0)*8)+34:B2=33:HP1=35:H
P2=13:CP=1:GOSUB 100
820 IF RC=2 THEN S=S+1:CP=1:GOSUB 100:
GOTO 820
830 IF RC=1 THEN NEXT PT:GOTO 900
840 GOSUB 3000
850 IF D2=5 OR D2=1 OR D2=37 OR (D2=25
 AND D1>45) OR ((D2=10) AND (D1=41 OR 
D1=49)) THEN M2=-M2:GOSUB 200:GOTO 820
852 IF D1=30 OR D1=46 OR D1=63 OR D1=4
9 OR (D1=41 AND D2<=16) THEN M1=-M1:GO
SUB 200:GOTO 820
854 A=M1:M1=-M2*2:M2=-A/2:GOSUB 200:GO
TO 820
899 REM Siodme pole gry
900 GOSUB 40:COLOR 2:FOR A=1 TO 9:PLOT
 25-A,37-A:DRAWTO 54,37-A:PLOT 15+A,17
-A:DRAWTO 51-A,17-A:NEXT A
902 FOR A=21 TO 27:PLOT 16,A:DRAWTO 54
,A:NEXT A:FOR A=1 TO 4:PLOT 16,16+A:DR
AWTO 50+A,16+A:NEXT A
904 COLOR 1:PLOT 38,11:DRAWTO 50,23:PL
OT 38,16:DRAWTO 45,23:PLOT 26,27:DRAWT
O 38,27
906 PLOT 39,27:DRAWTO 39,36
910 PRINT "  PILKA # 7   3 UDERZENIA":
P=3:FOR PT=1 TO NP:S=1:PRINT Z$(PT*10-
9,PT*10);" uderza"
915 B1=INT(RND(0)*8)+44:B2=33:HP1=33:H
P2=32:CP=1:GOSUB 100
920 IF RC=2 THEN S=S+1:CP=1:GOSUB 100:
GOTO 920
930 IF RC=1 THEN NEXT PT:GOTO 1000
940 GOSUB 3000
950 IF D1=15 OR D1=55 OR (D1=39 AND D2
>26) THEN M1=-M1:GOSUB 200:GOTO 920
952 IF D2=37 OR D2=7 OR D2=27 THEN M2=
-M2:GOSUB 200:GOTO 920
954 IF D1<25 AND D2<17 THEN A=M1:M1=-M
2*2:M2=-A/2:GOSUB 200:GOTO 920
956 A=M1:M1=M2*2:M2=A/2:GOSUB 200:GOTO
 920
999 REM Osme pole gry
1000 GOSUB 40:COLOR 2:FOR A=27 TO 36:P
LOT 29,A:DRAWTO 43,A:NEXT A:FOR A=1 TO
 8:PLOT 29-A,27-A:DRAWTO 43+A,27-A
1002 PLOT 21,19-A:DRAWTO 52,19-A:PLOT 
21+A,11-A:DRAWTO 52-A,11-A:NEXT A
1004 COLOR 1:PLOT 30,11:DRAWTO 33,14:D
RAWTO 33,21:DRAWTO 36,24:PLOT 37,24:DR
AWTO 40,21:DRAWTO 40,14:DRAWTO 43,11
1010 PRINT "  PILKA # 8   3 UDERZENIA"
:P=3:FOR PT=1 TO NP:S=1:PRINT Z$(PT*10
-9,PT*10);" uderza"
1015 B1=INT(RND(0)*8+32):B2=33:HP1=36:
HP2=17:CP=1:GOSUB 100
1020 IF RC=2 THEN S=S+1:CP=1:GOSUB 100
:GOTO 1020
1030 IF RC=1 THEN NEXT PT:GOTO 1100
1040 GOSUB 3000
1050 IF D2=37 OR D2=2 THEN M2=-M2:GOSU
B 200:GOTO 1020
1051 IF D1=33 OR D1=40 THEN IF D2=21 O
R D2=14 THEN GOTO 1054
1052 IF D1=20 OR D1=53 OR D1=33 OR D1=
40 OR D1=28 OR D1=44 THEN M1=-M1:GOSUB
 200:GOTO 1020
1054 IF (D1>43 AND D2>18) OR (D1<30 AN
D D2<11) OR (D1>36 AND D1<44) THEN A=M
1:M1=-M2*2:M2=-A/2:GOSUB 200:GOTO 1020
1056 A=M1:M1=M2*2:M2=A/2:GOSUB 200
1060 GOTO 1020
1099 REM Dziewiate pole gry
1100 GOSUB 40:COLOR 2:FOR A=27 TO 36:P
LOT 29,A:DRAWTO 43,A:NEXT A:FOR A=3 TO
 27:PLOT 20,A:DRAWTO 52,A:NEXT A
1102 COLOR 1:PLOT 34,10:DRAWTO 31,13:P
LOT 39,10:DRAWTO 42,13:PLOT 27,14:DRAW
TO 35,22:PLOT 38,22:DRAWTO 46,14
1110 PRINT "  PILKA # 9   4 UDERZENIA"
:P=4:FOR PT=1 TO NP:S=1:PRINT Z$(PT*10
-9,PT*10);" uderza"
1115 B1=INT(RND(0)*8+32):B2=33:HP1=36:
HP2=17:CP=1:GOSUB 100
1120 IF RC=2 THEN S=S+1:CP=1:GOSUB 100
:GOTO 1120
1130 IF RC=1 THEN NEXT PT:GOTO 2000
1140 GOSUB 3000
1150 IF D2=37 OR D2=2 OR D2=28 THEN M2
=-M2:GOSUB 200:GOTO 1120
1152 IF D1=19 OR D1=53 OR ((D1=28 OR D
1=44) AND D2>26) THEN M1=-M1:GOSUB 200
:GOTO 1120
1154 IF (D1>37 AND D2>13) OR (D1<36 AN
D D2<14) THEN A=M1:M1=-M2*2:M2=-A/2:GO
SUB 200:GOTO 1120
1156 A=M1:M1=M2*2:M2=A/2:GOSUB 200
1160 GOTO 1120
1999 REM Zakonczenie gry
2000 GRAPHICS 0:PRINT "    WYNIKI KONC
OWE:":PRINT :PRINT "   GRACZ   PUNKTY 
KARNE":PRINT "-----------------------"
2005 FOR A=1 TO NP:PRINT Z$(A*10-9,A*1
0);" : ";S(A):NEXT A
2010 PRINT :PRINT "Jeszcze raz (T/N)";
2015 POKE 764,255
2020 GOSUB 3000:A=PEEK(764):IF A<>45 A
ND A<>35 THEN 2020
2025 POKE 764,255
2030 IF A=45 THEN RUN 
2040 PRINT :PRINT :PRINT "DO ZOBACZENI
A.":CLOSE #1:END 
3000 SOUND 0,50,10,10
3005 HH=HH-10:IF HH<2 AND HH>-6 THEN H
H=2
3010 SOUND 0,200,10,10
3020 SOUND 0,0,0,0:RETURN 
9999 END 

Lesław Pasternak



Powrót na start | Powrót do spisu treści | Powrót na stronę główną

Pixel 2002