home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1985 January
/
1985-01.d64
/
vt
(
.txt
)
< prev
Wrap
Commodore BASIC
|
2022-09-20
|
2KB
|
56 lines
100 poke52,28:poke56,28:clr:poke36878,15:gosub270:gosub480
110 s1=0:s2=0:gosub430:ifflthen100
120 print"[147]":c=30720
130 r=r+1:ifs1>=100or(s2>=100andnp=2)or(r=11andnp=1)then540
140 fora=7724to7745:pokea,160:pokea+c,0:pokea+440,160:pokea+440+c,0:next
150 fora=7746to8142step22:pokea,160:pokea+c,0:pokea+21,160:pokea+21+c,0:next
160 ifb$="y"thengosub510
170 ifnp=2thenprint"red"s1"[146] blue"s2
180 ifnp=1thenprint"score"s2""spc(12)"round"r
190 poke251,225:poke252,30:poke253,235:poke254,30:poke837,7:poke838,d1
200 ti$="000000":sys7168:sc=int(ti/60):ifnp=1thensc=sc*lv
210 onpeek(834)goto220,230
220 sp=peek(870)+256*peek(871):gosub240:s2=s2+sc:goto120
230 sp=peek(872)+256*peek(873):gosub240:s1=s1+sc:goto120
240 poke36877,130:fora=1to6
250 pokesp,peek(sp)-2*(peek(sp)and128)+128:forb=1to400:next:poke36878,6-a:next
260 poke36877,0:poke36878,15:return
270 rem option routine
280 poke36879,25:print"[147]"tab(7)"trap 'em":poke198,0
290 print""tab(5)"1[146] one player":print""tab(5)"2[146] two player"
300 printspc(5)"3[146] quit"
310 geta$:ifa$<"1"ora$>"3"then310
320 ifa$="3"thenprint"[147]":end
330 np=val(a$):poke836,np
340 d1=11:poke843,0:ifnp=2then380
350 print" j[146]oystick or k[146]eyboard"
360 geta$:ifa$="j"thenpoke843,1:d1=7:return
370 ifa$<>"k"then360
380 print"[147]which key to go up":wait198,1:a(1)=peek(197):poke198,0
390 print"which key to go down":wait198,1:a(2)=peek(197):poke198,0
400 print"which key to go left":wait198,1:a(3)=peek(197):poke198,0
410 print"which key to go right":wait198,1:a(4)=peek(197):poke198,0
420 fora=1to4:poke829+a,a(a):next:return
430 print"[147] enter speed (0-9)"
440 print" or (c) for options"
450 geta$:if(a$<"0"ora$>"9")anda$<>"c"then450
460 ifa$="c"thenfl=1
470 lv=val(a$):p=60-lv*6:poke839,p:poke840,p:lv=lv+1:return
480 print"[147]do you want barriers?"
490 getb$:ifb$<>"y"andb$<>"n"then490
500 return
510 fora=1to15
520 q=rnd(1)*430+7746:ifpeek(q)<>32or(q>7899andq<7922)then520
530 pokeq,160:pokeq+c,0:next:return
540 ifnp=2then580
550 print"[147]"spc(7)"score:"s2
560 ifs2>hithenhi=s2
570 printspc(8)"high:"hi:goto620
580 w=-(s1>=100)-2*(s2>=100):print"[147]"spc(5)"player"w"wins!"
590 print"sc :"s1:printspc(12)"[145]sc :"s2
600 wi(w)=wi(w)+1:print"wins:"wi(1):printspc(12)"[145]wins:"wi(2)
610 t1=t1+s1:t2=t2+s2:print"tot :"t1:printspc(12)"[145]tot :"t2
620 printspc(6)"hit any key":poke198,0
630 geta$:ifa$=""then630
640 onnpgoto100,110