home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tiger Disk 12
/
Tiger_Disk_012_19xx_Tiger-Crew-Disk_de_Side_A.d64
/
tower
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2023-02-26
|
13KB
|
297 lines
0 poke50257,16:rem statuswert
1 rem *********************************
2 rem * - - - - - - tower - - - - - - *
3 rem * regeln von vier-gewinnt *
4 rem * fuer 2 spieler gegeneinander *
5 rem * oder *
6 rem * fuer 1 spieler gegen den c-64 *
7 rem * - - - - - - - - - - - - - - - *
8 rem * (c) by hk *
9 rem *********************************
10 restore:print"[147]";:poke53280,11:poke53281,11:poke51,0:poke52,144
20 printchr$(9);chr$(142);chr$(8)
30 poke55,0:poke56,96:x=0:poke808,251
40 rn=rnd(ti):sp=int(rnd(rn)*2+1)
50 poke2,0:poke247,0:dima(7),b(7)
60 x=0:fori=40474to40952
70 reada:pokei,a:x=x+a
80 next:ifx<>44929thenprint"fehler in datenblock 1":end
90 sys40704:gosub1110:print"[147]";
100 fora=25088to25200:pokea,0:nexta
110 fora=1to7:a(a)=0:b(a)=0:poke25352+(a-1)*16,0:nexta
120 sys40752:q1=54272
130 print" splr[221] a [221] b [221] c [221] d [221] e [221] f [221] g [221]splr "
140 print" [163][163][163][163][221][163][163][163][221][163][163][163][221][163][163][163][221][163][163][163][221][163][163][163][221][163][163][163][221][163][163][163][221][163][163][163][163]"
150 print" [221] [221] [221] [221] [221] [221] [221] [221]"
160 print" [176][192][174] [171][192][192][192][219][192][192][192][219][192][192][192][219][192][192][192][219][192][192][192][219][192][192][192][219][192][192][192][179] [176][192][174]"
170 print" [221] [221] [221] [221] [221] [221] [221] [221] [221] [221] [221] [221]"
180 print" [173][192][189] [221] [221] [221] [221] [221] [221] [221] [221] [173][192][189]"
190 print" [171][192][192][192][219][192][192][192][219][192][192][192][219][192][192][192][219][192][192][192][219][192][192][192][219][192][192][192][179]"
200 print" [221] [221] [221] [221] [221] [221] [221] [221]"
210 print" zug [221] [221] [221] [221] [221] [221] [221] [221] zug"
220 print" [163][163][163][163][171][192][192][192][219][192][192][192][219][192][192][192][219][192][192][192][219][192][192][192][219][192][192][192][219][192][192][192][179][163][163][163][163]"
230 print" [221] [221] [221] [221] [221] [221] [221] [221]"
240 print" [221] [221] [221] [221] [221] [221] [221] [221]"
250 print" [171][192][192][192][219][192][192][192][219][192][192][192][219][192][192][192][219][192][192][192][219][192][192][192][219][192][192][192][179]"
260 print" [221] [221] [221] [221] [221] [221] [221] [221]"
270 print" [221] [221] [221] [221] [221] [221] [221] [221]"
280 print" [171][192][192][192][219][192][192][192][219][192][192][192][219][192][192][192][219][192][192][192][219][192][192][192][219][192][192][192][179]"
290 print" [221] [221] [221] [221] [221] [221] [221] [221]"
300 print" [221] [221] [221] [221] [221] [221] [221] [221]"
310 print" [171][192][192][192][219][192][192][192][219][192][192][192][219][192][192][192][219][192][192][192][219][192][192][192][219][192][192][192][179]"
320 print" [221] [221] [221] [221] [221] [221] [221] [221]"
330 print" [221] [221] [221] [221] [221] [221] [221] [221]"
340 print" [173][192][192][192][177][192][192][192][177][192][192][192][177][192][192][192][177][192][192][192][177][192][192][192][177][192][192][192][189]"
350 print"[153] (1) ";z1$;"[146] ";z2$;"[146] (2)"
360 print" "
370 printtab(5);"[153]";z1tab(23);"[154]";z2;"[145]"
380 x1=5:x2=6:y1=162:y2=196:w1=177:w2=178
390 pokeco+y1,x1:pokeco+y2,x2
400 poke198,0
410 ifsp=1thenpoketx+y2,32:poketx+y1,w1
420 ifsp=2thenpoketx+y1,32:poketx+y2,w2
430 ifsp=2andz=1thengosub790:rem computer-zug
440 ifsp=1or(sp=2andz=0)thengosub520
450 zz=zz+1
460 poke247,sp:poke248,(t-1)*16:poke249,a(t)-1
470 sys 24576
480 ifpeek(247)=0andzz=49then1100
490 ifpeek(247)<>0then930:rem sieger
500 sp=sp+1:ifsp=3thensp=1
510 goto400
520 poke198,0
530 geta$:ifa$=""then530
540 ifa$<"a"ora$>"g"then530
550 z$="abcdefg"
560 fora=1to7
570 ifa$=mid$(z$,a,1)thent=a:a=7:goto580
580 nexta
590 ifa(t)=7then530
600 a(t)=a(t)+1
610 poke25352+(t-1)*16,a(t)
620 gosub650:rem zug anzeigen
630 poke25088+(a(t)-1)+(t-1)*16,sp
640 return
650 ifsp=1thenfa=x1
660 ifsp=2thenfa=x2
670 c1=co+882-a(t)*120+t*4
680 c2=tx+882-a(t)*120+t*4
690 fora=0to1
700 forb=0to2
710 pokec1+a*40+b,fa
720 pokec2+a*40+b,160
730 nextb
740 nexta
750 pokeq1+1,30:pokeq1+5,10:pokeq1+15,1:pokeq1+24,15
760 pokeq1+4,21:fori=1to300:next
770 pokeq1+4,20
780 return
790 sys25456:rem tower-logic $6370
800 ifpeek(247)<>0thent=peek(247):goto870
810 fora=1to7:b(a)=peek(25353+(a-1)*16):nexta
820 c=49
830 fora=1to7:ifa(a)=7then860
840 pe=peek(25344+(a-1)*16+a(a))
850 ifb(a)=1andpe<cthenc=pe:t=a
860 nexta
870 a(t)=a(t)+1
880 poke25352+(t-1)*16,a(t)
890 gosub650:rem zug anzeigen
900 poke25088+(a(t)-1)+(t-1)*16,2
910 fora=1to7:b(a)=1:nexta
920 return
930 print"";
940 print" "
950 print" "
960 print" [145][145][145]"
970 ifn$="niemand "then1000
980 ifpeek(247)=1thenn$=z1$:z1=z1+1
990 ifpeek(247)=2thenn$=z2$:z2=z2+1
1000 print" [164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164]"
1010 print" ";n$;" hat gewonnen.nochmal?[146]";
1020 ifn$="niemand "thenn$=""
1030 poke198,0:sys40704
1040 geta$:ifa$=""then1040
1050 ifa$="n"then90
1060 ifa$<>"j"then1040
1070 poke247,0:zz=0
1080 sp=sp+1:ifsp=3thensp=1
1090 print"";:goto100
1100 n$="niemand ":goto930
1110 print"[147]"
1120 tx=1024:co=55296
1130 poke53280,.:poke53281,.:print"[150]";:rem farben stetzen
1140 print" [175][175][175][175][175][175][175][175] [175][175][175][175][175][175] [175][175][175][175] [175][175][175][175][175][175] [175][175][175][175][175][175]"
1150 print" [206] [169][146][206] [169][146][206] [169][223][146] [205][223][146] [205][223][146] [205]"
1160 print" [207][183][183][183][183][183][183][208] [146][207][183][183][183][183][208] [146][207][208] [146][207][208] [146][207][183][183][183][183][208] [146][207][183][183][183][183][208]"
1170 print" [204][175][175] [175][175][186][169][165] [167] [146][165][167] [146][165][167] [146][165] [175][175][175][186] [146][165] [167]"
1180 print" [165][167] [146] [165] [146][208] [167] [146][165][167] [146][165][167] [146][165][167] [205] [146][165] [207][223] [167] [146]"
1190 print" [165][167] [146] [165] [146][167] [167] [146][165][167] [146][165][167] [146][165] [183][208] [146][165] [163][163] [167]"
1200 print" [165][167] [146] [165] [146][167] [167] [146][165][167] [146][165][167] [146][165] [175][186] [146][165] [164][186]"
1210 print" [165][167] [146] [165] [169][208] [167] [146][165][167][169][223][165][167] [146][165] [165] [183][205] [146][165][167][205] [205]"
1220 print" [165][167] [146] [165] [183][183] [167] [146][165] [167] [146][165] [183][183][183][208] [146][165][167] [205] [205]"
1230 print" [204][186][169] [204][175][175][175][175][186][169][204][175][206][205][175][186][223][204][175][175][175][175][186][223][204][186] [205][186]"
1240 fora=1to13:print" ":nexta
1250 print""
1260 forfa=6to2step-1
1270 fora=0to(11-(fa-2)*2)*40
1280 pokeco+a,fa
1290 nexta
1300 nextfa
1310 print"";:rem txt-farbe
1320 print""tab(11)"[164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164]"
1330 print" *** von m. schwi ***"
1350 print""
1360 ifq=1goto1430
1370 x=0:fori=24576to24896
1380 reada:pokei,a:x=x+a
1390 next:ifx<>42376thenprint"fehler in datenblock 2":end
1400 x=0:fori=25344to26224
1410 reada:pokei,a:x=x+a
1420 next:q=1:ifx<>94355thenprint"fehler in datenblock 3":end
1430 print" [164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164]"
1440 print" brauchst du eine anleitung? (j/n) [146] ";:poke204,0:poke198,0
1450 geta$:ifa$=""then1450
1460 ifa$="j"then1490
1470 poke204,1:print"[147]";:goto1740
1480 printtab(12)"[221] [221] [221] [221] [221] [221][160][221] [221]"
1490 poke204,1:print"[147]"
1500 print" bei diesem spiel muessen zwei "
1510 print" spieler versuchen 4 ihrer chips in"
1520 print" horizontaler, vertikaler oder "
1530 print" diagonaler anordnung auf dem feld"
1540 print" zu plazieren. wer das schafft, ist "
1550 print" der sieger."
1560 print
1570 printtab(19)" a b c d e f g"
1580 fora=1to6
1590 printtab(19)"[171][192][219][192][219][192][219][192][219][192][219][192][219][192][179]"
1600 nexta
1610 printtab(19)"[173][192][177][192][177][192][177][192][177][192][177][192][177][192][189]"
1620 print"[145][145][145][145][145] [164][164][164][164][164][164][164][164][164][164][164][164][164][164][164]"
1630 print" das spielfeld "
1640 print" [164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164]"
1650 print" druecke eine taste !"
1660 poke198,0
1670 geta$:ifa$=""then1670
1680 print"[147]"spc(15)"[164][164][164][164][164][164][164][164][164]"
1690 printspc(15)"t o w e r[146]"
1700 print"";
1710 print" zur bestimmung der chip-position "
1720 print" drueckst du die entsprechende taste"
1730 print" deines c-64. viel spass!"
1740 print" [164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164]"
1750 print" hast du einen spielpartner ? (j/n)[146] ";:poke204,0
1760 poke198,0:open1,0
1770 geta$:ifa$=""then1770
1780 z=0:ifa$="n"thenz=1:goto1810
1790 ifa$="j"then1810
1800 goto1770
1810 poke204,1:print" [159]":ifz=1thenprint" ok,ich bin ein fairer partner!"
1820 print" wie heisst du : ";:input#1,z1$:print:z1$=left$(z1$+" ",9)
1830 ifz=0thenprint" & dein partner : ";:input#1,z2$:print:z2$=left$(z2$+" ",9)
1840 ifz=1thenz2$="c b m "
1850 z1$="[153]"+z1$:z2$="[154]"+z2$
1860 print" [164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164][164]"
1870 print" druecke eine taste [146]"
1880 poke198,0
1890 geta$:ifa$=""then1890
1900 close1:return
1910 rem von 40474 bis 40952
1920 data 0, 0, 0, 0, 8, 0, 10,101, 0, 0, 0, 0, 0, 11, 80, 0, 0, 0
1930 data 0, 0, 0,240, 0, 0, 0, 0, 0,162, 14, 20,162, 14, 40,109, 16, 20
1940 data103, 17, 40,237, 21, 20,137, 19, 20,162, 14, 40,103, 17, 40, 69, 29, 20
1950 data 69, 29, 40, 69, 29, 20, 20, 26, 30,237, 21, 10,137, 19, 20,237, 21,100
1960 data 69, 29, 20, 69, 29, 40, 69, 29, 20, 20, 26, 30,237, 21, 10,137, 19, 29
1970 data137, 19, 1,162, 14, 20,162, 14, 10,162, 14, 20,103, 17, 40,162, 14, 20
1980 data162, 14, 40,237, 21, 20,237, 21, 20,137, 19, 30,103, 17, 10,162, 14,100
1990 data 0,247, 10, 80, 10, 13, 60,162, 14, 60,103, 17, 60,237, 21, 60,207, 34
2000 data 60,109, 16,120,247, 10, 60, 10, 13, 60,162, 14, 60,103, 17, 60,247, 10
2010 data 60,109, 16, 60,247, 10,120, 0, 0,181, 8, 80,248, 10, 60, 79, 12, 60
2020 data163, 14, 60,208, 34, 60,238, 21, 60,197, 9,120,181, 8, 60,248, 10, 60
2030 data 79, 12, 60,163, 14, 60,248, 10, 60,110, 16, 60,248, 10, 50,248, 10, 10
2040 data110, 16, 10,104, 17, 10,110, 16, 10,248, 10, 10, 0, 0,169, 1,141, 21
2050 data158,141, 16,158,141, 17,158,169,253,141, 18,158,141, 19,158,141, 20,158
2060 data162, 24,189, 27,158,157, 0,212,202, 16,247,120,169, 72,141, 20, 3,169
2070 data159,141, 21, 3, 88, 96, 96, 96,162, 24,169, 0,157, 0,212,202, 16,250
2080 data120,169, 49,141, 20, 3,169,234,141, 21, 3, 88, 96, 96,169, 15,141, 24
2090 data212,234,206, 21,158,208, 72,238, 18,158,238, 18,158,238, 18,158,173, 18
2100 data158,201, 99,240, 32,170,169, 64,141, 4,212,189, 53,158,141, 0,212,189
2110 data 54,158,141, 1,212,189, 55,158,141, 21,158,169, 65,141, 4,212, 24,144
2120 data 24,169,253,141, 18,158,141, 19,158,141, 20,158,169, 1,141, 21,158,141
2130 data 16,158,141, 17,158,208, 90,206, 16,158,208, 40,169, 32,141, 11,212,238
2140 data 19,158,238, 19,158,238, 19,158,174, 19,158,189,153,158,141, 7,212,189
2150 data154,158,141, 8,212,189,155,158,141, 16,158,169, 33,141, 11,212,206, 17
2160 data158,208, 40,169, 16,141, 18,212,238, 20,158,238, 20,158,238, 20,158,174
2170 data 20,158,189,197,158,141, 14,212,189,198,158,141, 15,212,189,199,158,141
2180 data 17,158,169, 17,141, 18,212, 76, 49,234, 0
2190 rem von 24576 bis 24896 datenblock 2
2200 data162, 0,169, 98,141, 14, 96,165,248,141, 13, 96,173,255,255,197,247,240
2210 data 12,232,224, 4,240, 39, 24,238, 13, 96, 76, 12, 96,160, 0,173, 13, 96
2220 data141, 49, 96,169, 98,141, 50, 96,238, 49, 96,200,173,255,255,197,247,208
2230 data220,192, 3,240, 3, 76, 44, 96, 96,162, 0,169, 98,141, 77, 96,165,249
2240 data141, 76, 96,173,255,255,197,247,240, 17,232,224, 4,240, 50, 24,173, 76
2250 data 96,105, 16,141, 76, 96, 76, 75, 96,160, 0,173, 76, 96,141,123, 96,169
2260 data 98,141,124, 96, 24,173,123, 96,105, 16,141,123, 96,200,173,255,255,197
2270 data247,208,209,192, 3,240, 3, 76,112, 96, 96,162, 0,169, 98,141,151, 96
2280 data169, 0,141,150, 96,173,255,255,197,247,240, 30,232,224, 4,240, 7, 24
2290 data238,150, 96, 76,149, 96, 24,173,150, 96,105, 13,201, 64,240, 46,141,150
2300 data 96,162, 0, 76,149, 96,160, 0,173,150, 96,141,210, 96,169, 98,141,211
2310 data 96, 24,173,210, 96,105, 17,141,210, 96,200,173,255,255,197,247,208,196
2320 data192, 3,240, 3, 76,199, 96, 96,162, 0,169, 98,141,238, 96,169, 6,141
2330 data237, 96,173,255,255,197,247,240, 30,232,224, 4,240, 7, 24,206,237, 96
2340 data 76,236, 96, 24,173,237, 96,105, 19,201, 70,240, 46,141,237, 96,162, 0
2350 data 76,236, 96,160, 0,173,237, 96,141, 41, 97,169, 98,141, 42, 97, 24,173
2360 data 41, 97,105, 15,141, 41, 97,200,173,255,255,197,247,208,196,192, 3,240
2370 data 3, 76, 30, 97, 96,169, 0,133,247, 96,170,119,145,191, 0
2380 rem von 25344 bis 26224 datenblock 3
2390 data 15, 21, 29, 35, 42, 46, 47,170,170,170,170,170,170,170,170,170, 7, 12
2400 data 20, 26, 34, 39, 43,170,170,170,170,170,170,170,170,170, 2, 6, 11, 17
2410 data 25, 31, 38,170,170,170,170,170,170,170,170,170, 0, 1, 4, 9, 16, 23
2420 data 30,170,170,170,170,170,170,170,170,170, 3, 5, 10, 18, 24, 32, 37,170
2430 data170,170,170,170,170,170,170,170, 8, 13, 19, 27, 33, 40, 44,170,170,170
2440 data170,170,170,170,170,170, 14, 22, 28, 36, 41, 45, 48,170,170,170,170,170
2450 data170,170,170,170,169, 0,141,111, 99,141, 95, 99,141,107, 99,173, 95, 99
2460 data 10, 10, 10, 10,170,189, 8, 99,201, 7,240, 55, 24,133,249,142,156, 99
2470 data109,156, 99,141,156, 99,141,168, 99,169, 2,141,255, 98,133,247,134,248
2480 data 32, 0, 96,169, 0,141,255, 98,165,247,201, 2,208, 17, 24,173, 95, 99
2490 data105, 1,141,111, 99,169, 7,141, 95, 99, 76,196, 99,238, 95, 99,169, 7
2500 data205, 95, 99,240, 3, 76,123, 99,173,111, 99,201, 0,240, 3,133,247, 96
2510 data169, 0,141, 95, 99,173, 95, 99, 10, 10, 10, 10,170,169, 0,157, 9, 99
2520 data169, 7,157, 10, 99,238, 95, 99,169, 7,205, 95, 99,208,228,169, 0,141
2530 data 95, 99,173, 95, 99, 10, 10, 10, 10,170,189, 8, 99,141,109, 99,201, 7
2540 data208, 11,169, 0,157, 9, 99,157, 10, 99, 76, 14,101,142, 49,100, 24,168
2550 data109, 49,100,141, 49,100,141,254,100,200,152,157, 8, 99,169, 2,141,255
2560 data 98,169, 0,141,107, 99,173,107, 99, 10, 10, 10, 10,170,189, 8, 99,141
2570 data110, 99,201, 7,208, 3, 76,238,100,142,101,100, 24,168,133,249,109,101
2580 data100,141,101,100,141,221,100,200,152,157, 8, 99,169, 1,141,255, 98,133
2590 data247,134,248, 32, 0, 96,173, 95, 99, 10, 10, 10, 10,170,165,247,201, 1
2600 data208, 9, 56,189, 10, 99,233, 1,157, 10, 99,169, 0,141,108, 99,173,108
2610 data 99, 10, 10, 10, 10,170,189, 8, 99,201, 7,240, 55,142,171,100, 24,133
2620 data249,109,171,100,141,171,100,141,183,100,169, 2,141,255, 98,133,247,134
2630 data248, 32, 0, 96,169, 0,141,255, 98,165,247,201, 2,208, 17,173, 95, 99
2640 data 10, 10, 10, 10,170, 24,189, 9, 99,105, 1,157, 9, 99,238,108, 99,169
2650 data 7,205,108, 99,208,176,169, 0,141,255, 98,173,107, 99, 10, 10, 10, 10
2660 data170, 24,173,110, 99,157, 8, 99,238,107, 99,169, 7,205,107, 99,240, 3
2670 data 76, 56,100,169, 0,141,255, 98,173, 95, 99, 10, 10, 10, 10,170,173,109
2680 data 99,157, 8, 99,238, 95, 99,169, 7,205, 95, 99,240, 3, 76,254, 99,169
2690 data 0,133,247,234,169, 0,141,107, 99,141,108, 99,173, 10, 99,141,110, 99
2700 data169, 1,141, 95, 99,173, 95, 99, 10, 10, 10, 10,170,189, 10, 99,205,110
2710 data 99,240, 8,176, 3, 76, 75,101,141,110, 99,238, 95, 99,169, 7,205, 95
2720 data 99,240, 3, 76, 51,101,169, 0,141,109, 99,141, 95, 99,173, 95, 99, 10
2730 data 10, 10, 10,170, 24,189, 10, 99,109,109, 99,141,109, 99,238, 95, 99,169
2740 data 7,205, 95, 99,240, 3, 76, 96,101,173,109, 99,201, 0,208, 31,169, 0
2750 data141, 95, 99,173, 95, 99, 10, 10, 10, 10,170,169, 1,157, 10, 99,238, 95
2760 data 99,169, 7,205, 95, 99,240, 3, 76,139,101,169, 0,141,108, 99,141, 95
2770 data 99,173, 95, 99, 10, 10, 10, 10,170,189, 9, 99,205,108, 99,240, 19,176
2780 data 3, 76,208,101,189, 10, 99,205,110, 99,208, 6,189, 9, 99,141,108, 99
2790 data238, 95, 99,169, 7,205, 95, 99,240, 3, 76,173,101,169, 0,141, 95, 99
2800 data173, 95, 99, 10, 10, 10, 10,170,189, 9, 99,205,108, 99,208, 16,189, 10
2810 data 99,205,110, 99,208, 8,169, 1,157, 9, 99, 76, 7,102,169, 0,157, 9
2820 data 99,238, 95, 99,169, 7,205, 95, 99,240, 3, 76,226,101,169, 0,141,109
2830 data 99,141, 95, 99,173, 95, 99, 10, 10, 10, 10,170, 24,189, 9, 99,109,109
2840 data 99,141,109, 99,238, 95, 99,169, 7,205, 95, 99,240, 3, 76, 28,102,173
2850 data109, 99,201, 0,208, 31,169, 0,141, 95, 99,173, 95, 99, 10, 10, 10, 10
2860 data170,169, 1,157, 9, 99,238, 95, 99,169, 7,205, 95, 99,240, 3, 76, 71
2870 data102, 96, 0,170,170,170,170, 0, 69, 69, 0,186, 69,217, 0, 5, 0