home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tiger Disk 25
/
Tiger_Disk_025_19xx_Tiger-Crew-Disk_de_Side_D.d64
/
b.epreis
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2023-02-26
|
3KB
|
163 lines
10 poke 53265,peek(53265)and 239
110 code=7*4096:vars=5*4096+6*256
111 gr=peek(code+3)+peek(code+4)*256
112 pg=vars
114 ps=vars+7
116 rs=ps+268
118 as=rs+80+512
120 es=as+560
122 pa=es+200
150 ap=peek(pg+1)
200 dim r(3),u(3)
1000 :
1001 rem bere ***** umweltpreise
1002 :
1003 ag=gr
1005 for z=0 to 8
1010 bp=0
1011 bu=0
1050 for y=0 to 5
1055 rs=peek(ag+2)
1060 s=rs and 15
1065 p=int(rs/16)
1070 if s<>2 then 1090
1075 if peek(ps+(p-1)*67+56)=255 then 1090
1080 u=peek(ag+27)
1082 r(p-1)=r(p-1)+1
1083 u(p-1)=u(p-1)+u
1085 if (u>20) and (bu<u) then bp=p:bu=u: rem !!! dieser player ist besser
1090 ag=ag+31:next y
1100 :
1110 rem ***** uwpverleih
1120 if bu=0 then 1200
1124 b=ps+(bp-1)*67+58+z
1125 poke b,peek(b)+1 : rem ump +1
1126 ft=69:sys code,22,ft
1127 poke 53265,peek(53265)and 239
1128 fp=bp:op=3:gosub 7200
1140 op=13+2:fp=5+z+1:gosub 7010
1150 ap=bp:gosub 20000
1160 k=k+100000:gosub 21000
1200 next z
1400 :
1401 :
1402 rem **** welche erden ???
1403 :
1404 :
1405 for z=0 to 3
1406 if r(z)=0 then goto 1499
1410 ud=u(z)/r(z)
1415 if ud<0 then goto 1440:rem e5
1420 if ud<10 then goto 1450:rem e4
1425 if ud<35 then goto 1460:rem e3
1430 if ud<60 then goto 1470:rem e2
1435 goto 1480: rem e1
1440 ft=74:fp=z+1:op=3:gosub 7000
1445 sys code,1,"l.erde3",8
1447 gosub 50000
1449 goto 1499
1450 ft=73:fp=z+1:op=3:gosub 7000
1455 sys code,1,"l.erde3",8
1457 gosub 50000
1459 goto 1499
1460 ft=72:fp=z+1:op=3:gosub 7000
1465 sys code,1,"l.erde2",8
1467 gosub 50000
1469 goto 1499
1470 ft=71:fp=z+1:op=3:gosub 7000
1475 sys code,1,"l.erde1",8
1477 gosub 50000
1479 goto 1499
1480 ft=70:fp=z+1:op=3:gosub 7000
1485 sys code,1,"l.erde1",8
1487 gosub 50000
1489 goto 1499
1495 :
1499 next z
1501 rem ***** check gewinn !
1502 :
1510 for z=0 to 3
1515 ac=0:au=0
1516 b=ps+z*67+58
1520 for y=0 to 8
1525 u=peek(b+y)
1530 au=au+u
1535 if u<>0 then ac=ac+1
1540 next y
1545 if (ac>4) and (au>19) then 3000
1560 next z
2000 z=peek(vars+2):a$="l.city"+str$(z)
2001 sys code,25,1:sys code,1,a$,8
3000 :
3001 rem **** player z hat gewonnen
3002 :
3004 rem ** check if compi or play
3005 :
3006 :
3008 p=peek(pg)-1
3010 if z<=p then 3200
3100 :
3101 :
3102 rem **** compi win
3103 :
3105 ft=68:fp=z+1:op=3:gosub 7000
3106 sys code,9:sys code,1,"l.save",8:sys code,10
3107 sys code,25,1
3110 sys code,1,"l.splrzahl",8
3200 :
3201 :
3202 rem **** player win
3203 :
3205 ft=67:fp=z+1:op=3:gosub 7000
3206 sys code,9:sys code,1,"l.save",8:sys code,10
3207 sys code,25,1
3210 sys code,1,"l.splrzahl",8
7000 :
7001 rem ***** init fax
7004 sys code,22,ft
7005 poke 53265,peek(53265)and 239
7010 if fp>0 then gosub 7200
7012 sys code,1,"l.fax",8
7014 sys code,3
7015 sys code,4,3,4,6
7020 sys code,7,96,32,10
7030 sys code,6,3
7040 sys code,8
7050 return
7200 :
7201 rem insert name
7205 sys code,4,3,0,0
7206 sys code,21,fp
7208 for x=0 to 9
7210 poke 25344+op+x,peek(1024+x)
7212 next x
7250 return
20000 :
20001 rem get kontostand
20002 :
20005 b=ps+(ap-1)*67+2
20010 x=peek(b+3) and 128
20015 k=peek(b+0)
20020 k=k+peek(b+1)*256
20025 k=k+peek(b+2)*65536
20030 k=k+((peek(b+3) and127)*16777216)
20035 if x=128 then k=-k
20040 return
21000 :
21001 rem store kontostand
21002 :
21005 b=ps+(ap-1)*67+2
21010 x=0:if k<0 then k=k-k-k:x=128
21020 poke b+3,int(k/16777216)
21025 k=k-(int(k/16777216)*16777216)
21030 poke b+2,int(k/65536)
21035 k=k-(int(k/65536)*65536)
21040 poke b+1,int(k/256)
21045 k=k-(int(k/256)*256)
21050 poke b+0,k
21055 poke b+3,peek(b+3) or x
21060 return
50000 poke2,255
50010 if peek(2)=255 then 50010
50020 return