1
2
10
10 KEYOFF:COLOR 15,1,1:SCREEN 2,2:VDP(7)=(VDP(7) AND &HFC) OR 4:POKE &HF3EB,4:DEFINT A-Z
20 ON STOP GOSUB 65500:STOP ON
​
110
110
110 POKE &HFCAF,1
120
120 POKE &HF3AF,30
130
130 POKE &HF3B0,30
140
140 POKE &HF3B1,6
150
150 Y=BASE(10)+512+2*32
160 POKE &HF922,Y MOD 256
170 POKE &HF3BD,Y MOD 256
180 POKE &HF923,Y\256
190 POKE &HF9BE,Y\256
200 CLS:Y=BASE(10)+512:FOR I=0 TO 63:VPOKE Y+I,32:NEXT
210
210 VPOKE BASE(10)+255,254:VPOKE BASE(10)+511,254
250 PRINT "WAIT ...";
​
310
310
310 X=256*PEEK(5)+PEEK(4)+32*8
320 Y=BASE(12)+4096+32*8:Z=BASE(11)+4096+32*8
330 FOR I=0 TO 767:VPOKE Y+I,PEEK (X+I):VPOKE Z+I,&H1F:NEXT
​
410
410 Y=BASE(12)+4096:RESTORE 60340
420 FOR I=0 TO 7:READ A: VPOKE Y+I,A:NEXT
440
440 Y=BASE(12)+4096+31*8
450 FOR I=0 TO 7:READ A: VPOKE Y+I,A:NEXT
470
470 Y=BASE(10)+512
480 FOR I=0 TO 7:VPOKE Y+I*32,0:VPOKE Y+I*32+31,31:NEXT
500
500 Z=BASE(11)+4096
510 FOR I=0 TO 7:VPOKE Z+I,&H1E:VPOKE Z+I+248,&H1E:NEXT
​
710
710 RESTORE 60020
720 BN=6:K=255-4*BN:Y=BASE(12)+4096+8*K:Z=BASE(11)+4096+8*K
730 FOR I=0 TO BN*32-1:READ A:VPOKE Y+I,A:VPOKE Z+I,&H1E:NEXT
750
750 Y=BASE(12)+4096+8:Z=BASE(11)+4096+8:RESTORE 63000
760 FOR I=0 TO 31:READ A: VPOKE Y+I,A:VPOKE Z+I,&H1E:NEXT
770 Y=BASE(10)+513
780 FOR L=0 TO BN-1:FOR J=0 TO 1:FOR I=0 TO 1
790 VPOKE Y+J+I*32,K:K=K+1
800 NEXT I:NEXT J
810 VPOKE Y+2,1:VPOKE Y+34,2:Y=Y+3:NEXT L
820 FOR I=0 TO 29-BN*3:VPOKE Y,3:VPOKE Y+32,4:Y=Y+1:NEXT
​
900 POKE &HFCAF,2
910 LINE (0,0)-(255,127),4,BF
920 GOSUB 40000
925 POKE &HFCAF,1
​
930
930 Y=BASE(13):FOR I=0 TO 31:VPOKE Y+I*4,&HD1:NEXT
​
950
950 I=0:RESTORE 60500:GOSUB 53000
960
960 DIM NC(2,2)
990
990 DIM NM(2):DIM NW(2):DIM NS(2):DIM MR(2):DIM PA(2):DIM PT(2):DIM AC(2):DIM ST(2):DIM RS(2,2)
1000
1000 DIM BC(2):DIM RZ(2,2):DIM RY(2,2)
1010
1010 DIM D(4):D(0)=50:D(1)=3:D(2)=25:D(3)=5:D(4)=10
​
5000 GOSUB 52000:PRINT
5010 VPOKE BASE(11)+1,&HF4:VPOKE BASE(11)+2049,&HF4
5020 ON INTERVAL=100 GOSUB 41000:INTERVAL ON
​
5500
5500 PRINT "*******************":PRINT "* ISLAND WAR v1.0 *":PRINT "*******************":PRINT "Any key to start ...";
5510 A$=INKEY$:IF A$="" GOTO 5510
5520 PRINT:R=INT(RND(-TIME))
5530 FOR I=0 TO 2
5540 NM(I)=1:NW(I)=1:NS(I)=1:PA(I)=1:MR(I)=0:PT(I)=0:FOR K=0 TO 2:RS(I,K)=INT(RND(1)*10)-5:NC(I,K)=100:NEXT K
5550 NEXT I
5560
5560 HP=1:PT(HP)=1
5570
5570 GOSUB 42000
​
9999
9999 GOTO 20000
10000
10000
10000 IF PA(0)+PA(1)+PA(2)>1 GOTO 10020
10010 IF PA(HP)=1 THEN PRINT "CONGRATULATIONS ! YOU WIN !":GOTO 5500
10011 FOR J=0 TO 2
10012 IF PA(J)=1 AND HP<>J THEN PRINT "PLAYER ";CHR$(J+65);" WINS":PRINT "BETTER LUCK NEXT TIME":GOTO 5500
10013 NEXT J
10014 PRINT "NOBODY WINS AND":PRINT "THE WORLD IS DESTROYED !":GOTO 5500
​
10020 IF PA(HP)=0 GOTO 10200 ELSE PRINT "command: ";
10030 A$=INKEY$:IF A$="" GOTO 10030
10040 PRINT A$
10050 IF A$="A" OR A$="a" GOTO 15000
10060 IF A$="M" OR A$="m" GOTO 16000
10070 IF A$="D" OR A$="d" GOTO 17000
10080 IF A$="L" OR A$="l" GOTO 18000
10090 IF A$="P" OR A$="p" GOTO 19000
10100 IF A$="I" OR A$="i" GOTO 20000
10110 PRINT "unknown command ";A$
10120 GOTO 10000
​
10200
10200 IF PT(0)=0 THEN I=0:GOSUB 20100
10210 IF PT(2)=0 THEN I=2:GOSUB 20100
10600
10600 FOR I=0 TO 2
10610 IF PA(I)=0 GOTO 10710
10620 ON AC(I) GOTO 10710,10660,10710,10680
10630
10630 RZ(I,0)=INT(0.3+RND(1)+(NC(I,0)+NC(I,1)+NC(I,2))*RND(1)/100)
10640 RZ(I,1)=INT(0.3+RND(1)+(NC(I,0)+NC(I,1)+NC(I,2))*RND(1)/100)
10650 RZ(I,2)=INT(RND(1)/2+(NC(I,0)+NC(I,1)+NC(I,2))*RND(1)/200):GOTO 10710
10660
10660 RZ(I,0)=INT(RND(1)*D(0))
10670 GOTO 10710
10680
10680 FOR J=0 TO 2
10690 RZ(I,J)=INT(RND(1)*D(1))
10700 NEXT J
10710 NEXT I
​
11000
11000 FOR I=0 TO 2
11010 IF PA(I)=0 THEN BC(I)=0:GOTO 11060
11020
11020 IF NW(I)>1 AND RND(1)<0.008*NW(I) THEN L=D(2):GOSUB 54000:BC(I)=1:GOTO 11060
11030
11030 T=NC(I,0)+NC(I,1)+NC(I,2)
11040 IF RND(1)<T*0.0003 THEN L=D(3):GOSUB 54000:BC(I)=2:GOTO 11060
11050 BC(I)=0
11060 NEXT I
​
11940
11940 IF AC(0)<>3 GOTO 11960
11950 PUT SPRITE 9,(180,0),1,10:PUT SPRITE 22,(180,0),6,11
11960 IF AC(1)<>3 GOTO 11980
11970 PUT SPRITE 10,(240,34),1,10:PUT SPRITE 21,(240,34),6,11
11980 IF AC(2)<>3 GOTO 12000
11990 PUT SPRITE 11,(0,75),1,10:PUT SPRITE 20,(0,75),6,11
12000
12000 FOR I=0 TO 2
12010 IF PA(I)=0 GOTO 14000
12020 ON AC(I) GOTO 12230,12300,13000,13010
12040
12040
12040 IF I=0 THEN X=152:Y=3:S1=9:S2=22:GOTO 12070
12050 IF I=1 THEN X=160:Y=44:S1=10:S2=21:GOTO 12070
12060 X=90:Y=85:S1=11:S2=20
12070 C=0:K=0
12075 SOUND 0,255:SOUND 1,14:SOUND 8,9:SOUND 13,10:SOUND 6,245:SOUND 7,182
12080 PUT SPRITE S1,(X+C,Y),1,14:PUT SPRITE S2,(X+C,Y),C+14,15
12090 TIME=0
12100 IF TIME<10 GOTO 12100
12110 K=K+1:IF K>8 THEN PUT SPRITE S1,(0,209):PUT SPRITE S2,(0,209):GOSUB 43000:GOTO 12130
12120 C=(C+1) MOD 2:GOTO 12080
12130
12130 IF HP<>I GOTO 12190
12140 PRINT "You manufacture: ";
12150 IF (RZ(I,0)+RZ(I,1)+RZ(I,2))=0 THEN PRINT "nothing." ELSE PRINT
12160 IF RZ(I,0)>0 THEN PRINT RZ(I,0);" missile";:IF RZ(I,0)>1 THEN PRINT "s" ELSE PRINT
12170 IF RZ(I,1)>0 THEN PRINT RZ(I,1);" warhead";:IF RZ(I,1)>1 THEN PRINT "s" ELSE PRINT
12180 IF RZ(I,2)>0 THEN PRINT RZ(I,2);" satellite";:IF RZ(I,2)>1 THEN PRINT "s" ELSE PRINT
12190 NM(I)=NM(I)+RZ(I,0):NW(I)=NW(I)+RZ(I,1):NS(I)=NS(I)+RZ(I,2):MR(I)=0
12200 FOR J=0 TO 2:IF J<>I THEN RS(J,I)=RS(J,I)-5
12210 NEXT J
12220 GOTO 14000
12230
12230 IF I=0 THEN X=152:Y=3:S1=9:S2=22:GOTO 12260
12240 IF I=1 THEN X=160:Y=44:S1=10:S2=21:GOTO 12260
12250 IF I=2 THEN X=90:Y=85:S1=11:S2=20
12260 PUT SPRITE S1,(X,Y),15,8:PUT SPRITE S2,(X,Y),1,9
12270 PLAY "V12T200O4CRCO5CCRRR"
12280 IF PLAY(0) THEN 12280
12290 MR(I)=1:NM(I)=NM(I)-1:GOTO 14000
12300
12300 TP=ST(I)\10:TC=ST(I) MOD 10:GOSUB 38000
12420
12420
12420 IF I=0 THEN X0=152:Y0=3:S1=9:S2=22:GOTO 12450
12430 IF I=1 THEN X0=160:Y0=44:S1=10:S2=21:GOTO 12450
12440 X0=90:Y0=85:S1=11:S2=20
12450
12450 SOUND 6,20:SOUND 7,183:SOUND 8,10
12455 FOR K=1 TO 16
12460 PUT SPRITE S1,(X0,Y0-K),15,17:PUT SPRITE S2,(X0,Y0-K),1,16
12470 NEXT K
12480
12480 IF ABS(X0-X1)>ABS(Y0-16-Y1) GOTO 12485
12481 J=ABS(Y0-16-Y1):IF Y0-16<Y1 THEN T=18 ELSE T=16
12482 GOTO 12490
12485 J=ABS(X0-X1):IF X0<X1 THEN T=22 ELSE T=20
12490 DX#=CDBL(X1-X0)/J:DY#=CDBL(Y1-Y0+16)/J
12500 FOR K=0 TO J STEP 3
12505 X=X0+INT(K*DX#):Y=Y0-16+INT(K*DY#)
12510 PUT SPRITE S1,(X,Y),15,T+1:PUT SPRITE S2,(X,Y),1,T
12520 NEXT K
12530
12530 PUT SPRITE S1,(0,209):PUT SPRITE S2,(0,209)
12540 MR(I)=0:NW(I)=NW(I)-1
12550
12550 IF AC(TP)<>3 GOTO 12580
12560 PRINT"Missile shot down!"
12565 RS(TP,I)=RS(TP,I)-1
12570 GOSUB 43000:GOTO 14000
12580 T=RZ(I,0)
12590 IF T>NC(TP,TC) THEN T=NC(TP,TC)
12595 PRINT "Missile hits ";
12600 IF T>0 THEN PRINT "killing":PRINT T;"million" ELSE PRINT "but everybody takes shelter!"
12610 NC(TP,TC)=NC(TP,TC)-T:RS(TP,I)=RS(TP,I)-T:RS(I,TP)=RS(I,TP)+T
12620 GOSUB 38200:GOSUB 42000:GOTO 14000
​
13000
13000 NS(I)=NS(I)-1:MR(I)=0:GOTO 14000
​
13010
13010 IF I=0 THEN X=152:Y=3:S1=9:S2=22:GOTO 13040
13020 IF I=1 THEN X=160:Y=44:S1=10:S2=21:GOTO 13040
13030 X=90:Y=85:S1=11:S2=20
13040 C=0:K=0
13050 SOUND 0,0:SOUND 1,0:SOUND 8,9:SOUND 13,10:SOUND 7,190
13060 PUT SPRITE S1,(X,Y),1,12:PUT SPRITE S2,(X,Y),15,13
13070 FOR J=200 TO 255:SOUND 0,J:NEXT J
13080 FOR J=255 TO 200 STEP -1:SOUND 0,J:NEXT J
13090 K=K+1:IF K>6 THEN PUT SPRITE S1,(0,209):PUT SPRITE S2,(0,209):GOSUB 43000:GOTO 13130
13100 C=(C+1) MOD 2
13110 IF C=0 THEN PUT SPRITE S2,(X,Y),15,13 ELSE PUT SPRITE S2,(0,209)
13120 GOTO 13070
13130 S=0:FOR J=0 TO 2
13140 IF RZ(I,J)>NC(ST(I),J) THEN T=NC(ST(I),J) ELSE T=RZ(I,J)
13150 S=S+T:NC(ST(I),J)=NC(ST(I),J)-T:NEXT J
13151 K=32767:FOR J=0 TO 2:IF NC(I,J)<K AND NC(I,J)>0 THEN K=NC(I,J):L=J
13152 NEXT J:IF K=32767 THEN S=0 ELSE NC(I,L)=NC(I,L)+S
13160 IF ST(I)<>HP GOTO 13200
13170 PRINT "Propaganda hits";
13180 IF S=0 THEN PRINT " but nobody cares" ELSE PRINT ":":PRINT S;"million leave"
13190 GOTO 13230
13200 IF I<>HP GOTO 13230
13210 PRINT "Your sweet words ";
13220 IF S=0 THEN PRINT "are ignored by everyone" ELSE PRINT "bring:":PRINT S;"million"
13230 RS(ST(I),I)=RS(ST(I),I)-S:RS(I,ST(I))=RS(I,ST(I))+S:MR(I)=0
13240
13240 GOSUB 42000
​
14000 NEXT I
14010
14010 IF AC(0)<>3 GOTO 14030
14020 PUT SPRITE 9,(0,209):PUT SPRITE 22,(0,209)
14030 IF AC(1)<>3 GOTO 14050
14040 PUT SPRITE 10,(0,209):PUT SPRITE 21,(0,209)
14050 IF AC(2)<>3 GOTO 14100
14060 PUT SPRITE 11,(0,209):PUT SPRITE 20,(0,209)
​
14100
14100 FOR I=0 TO 2
14110 IF BC(I)=0 GOTO 14980
14130 TP=I:FOR J=0 TO 2:IF RY(I,J)>0 THEN TC=J:T=RY(I,J)
14150 NEXT J
14160 IF T>NC(I,TC) THEN T=NC(I,TC)
14165 IF BC(I)=2 GOTO 14200
14170
14170 IF I=HP THEN PRINT "Warhead explodes in a":PRINT "warehouse killing";T;"million" ELSE PRINT "Nuclear disaster detected"
14180 NC(I,TC)=NC(I,TC)-T:NW(I)=NW(I)-1
14190 S1=12:GOSUB 38000:GOSUB 38200:GOSUB 42000:GOTO 14980
14200
14210 GOSUB 38000:PUT SPRITE 12,(X1+16,Y1-2),1,28:PUT SPRITE 13,(X1+16,Y1-2),15,29
14220 PRINT "Riots";:IF HP=I THEN PRINT "!";T;"million dead" ELSE PRINT " detected"
14230 NC(I,TC)=NC(I,TC)-T
14240 PLAY "O4T200V10F#CF#CF#C"
14250 IF PLAY(0)=-1 GOTO 14250
14260 PUT SPRITE 12,(0,209):PUT SPRITE 13,(0,209)
​
14980 NEXT I
14990 FOR J=0 TO 2:IF NC(J,0)+NC(J,1)+NC(J,2)=0 THEN PA(J)=0 ELSE PA(J)=1
14995 NEXT J:GOTO 10000
​
15000
15000 PRINT "-Arm missile-"
15010 IF MR(HP)=1 THEN PRINT "Missile already armed":GOTO 10000
15020 IF NM(HP)=0 THEN PRINT "No missiles to arm":GOTO 10000
15030 GOSUB 39000
15040 IF A$="N" GOTO 10000
15050 PRINT "Arming missile"
15060 AC(HP)=1:GOTO 10200
​
16000
16000 PRINT "-Manufacture weapons-"
16010 GOSUB 39100
16020 GOSUB 39000
16030 IF A$="N" GOTO 10000
16040 PRINT "Preparing production"
16050 MR(HP)=0:AC(HP)=0:GOTO 10200
​
17000
17000 PRINT "-Launch defense satellite-"
17010 IF NS(HP)=0 THEN PRINT "No defense satellites":GOTO 10000
17020 GOSUB 39100
17030 GOSUB 39000
17040 IF A$="N" GOTO 10000
17050 PRINT "Preparing satellite"
17060 MR(HP)=0:AC(HP)=3:GOTO 10200
​
18000
18000 PRINT "-Launch missile-"
18010 IF MR(HP)=0 THEN PRINT "Arm missile first":GOTO 10000
18020 IF NW(HP)=0 THEN PRINT "No warhead to mount":GOTO 10000
18030 GOSUB 39500:GOSUB 39700
18040 INPUT "Enter target city";A$
18050 IF LEN(A$)<>2 GOTO 18040
18060 B$=LEFT$(A$,1):C$=RIGHT$(A$,1)
18070 IF (B$="A" OR B$="a") AND HP<>0 AND PA(0)=1 THEN TP=0:GOTO 18110
18080 IF (B$="B" OR B$="b") AND HP<>1 AND PA(1)=1 THEN TP=1:GOTO 18110
18090 IF (B$="C" OR B$="c") AND HP<>2 AND PA(2)=1 THEN TP=2:GOTO 18110
18100 GOTO 18040
18110 IF C$="1" AND NC(TP,0)>0 THEN TC=0:GOTO 18150
18120 IF C$="2" AND NC(TP,1)>0 THEN TC=1:GOTO 18150
18130 IF C$="3" AND NC(TP,2)>0 THEN TC=2:GOTO 18150
18140 GOTO 18040
18150 GOSUB 39600:GOSUB 39800
18160 GOSUB 39000
18170 IF A$="N" GOTO 10000
18180 PRINT "Preparing launch"
18190 AC(HP)=2:ST(HP)=TP*10+TC:GOTO 10200
​
19000
19000 PRINT "-Propaganda-"
19010 GOSUB 39100
19020 GOSUB 39500
19030 PRINT "Target player? ";
19040 A$=INKEY$:IF A$="" GOTO 19040
19050 PRINT A$
19060 IF (A$="A" OR A$="a") AND HP<>0 AND PA(0)=1 THEN TP=0:GOTO 19100
19070 IF (A$="B" OR A$="b") AND HP<>1 AND PA(1)=1 THEN TP=1:GOTO 19100
19080 IF (A$="C" OR A$="c") AND HP<>2 AND PA(2)=1 THEN TP=2:GOTO 19100
19090 GOTO 19030
19100 GOSUB 39600
19110 GOSUB 39000
19120 IF A$="N" GOTO 10000
19130 PRINT "Preparing propaganda"
19140 AC(HP)=4:ST(HP)=TP:MR(HP)=0:GOTO 10200
​
20000
20000 PRINT "You have:"
20010 PRINT NM(HP);"missile";:IF NM(HP)<>1 THEN PRINT "s" ELSE PRINT
20020 PRINT NW(HP);"warhead";:IF NW(HP)<>1 THEN PRINT "s" ELSE PRINT
20030 PRINT NS(HP);"satellite";:IF NS(HP)<>1 THEN PRINT "s" ELSE PRINT
20040 PRINT NC(HP,0)+NC(HP,1)+NC(HP,2);"million people"
20050 GOTO 10000
​
20100
20100
20100 IF MR(I)=0 OR NW(I)=0 GOTO 20150
20110
20110 K=32767:FOR J=0 TO 2:IF J<>I AND PA(J)=1 AND RS(I,J)<K THEN K=RS(I,J):L=J
20115 NEXT J
20120
20120 K=0:FOR J=0 TO 2:IF NC(L,J)>0 AND NC(L,J)>K THEN K=NC(L,J):C=J
20125 NEXT J
20130
20130 AC(I)=2:ST(I)=L*10+C
20140 RETURN
20150
20150 IF NS(I)=0 GOTO 20190
20160 IF I<>0 AND PA(0)=1 AND MR(0)=1 AND RS(I,0)<0 THEN AC(I)=3:MR(I)=0:RETURN
20170 IF I<>1 AND PA(1)=1 AND MR(1)=1 AND RS(I,1)<0 THEN AC(I)=3:MR(I)=0:RETURN
20180 IF I<>2 AND PA(2)=1 AND MR(2)=1 AND RS(I,2)<0 THEN AC(I)=3:MR(I)=0:RETURN
20190
20190 IF (NM(I)=0 OR NW(I)=0) AND RND(1)<0.5 THEN AC(I)=0:MR(I)=0:RETURN
20200
20200 IF NM(I)>0 AND NW(I)>0 AND RND(1)<0.5 THEN AC(I)=1:RETURN
20210
20210
20210 K=32767:FOR J=0 TO 2:IF J<>I AND PA(J)=1 AND RS(I,J)<K THEN K=RS(I,J):L=J
20215 NEXT J
20220 AC(I)=4:ST(I)=L:MR(I)=0:RETURN
​
38000
38000 IF TP<>0 GOTO 38040
38010 IF TC=0 THEN X1=20:Y1=15:RETURN
38020 IF TC=1 THEN X1=57:Y1=27:RETURN
38030 X1=90:Y1=3:RETURN
38040 IF TP<>1 GOTO 38080
38050 IF TC=0 THEN X1=97:Y1=56:RETURN
38060 IF TC=1 THEN X1=168:Y1=68:RETURN
38070 X1=200:Y1=44:RETURN
38080 IF TC=0 THEN X1=34:Y1=85:RETURN
38090 IF TC=1 THEN X1=72:Y1=109:RETURN
38100 X1=120:Y1=97:RETURN
​
38200
38200 SOUND 6,255:SOUND 7,135
38210 PUT SPRITE S1,(X1,Y1-4),11,24
38220 FOR J=1500 TO 1125 STEP -5:SOUND 8,J/100:NEXT J
38230 PUT SPRITE S1,(X1,Y1-4),9,25
38240 FOR J=1125 TO 750 STEP -5:SOUND 8,J/100:NEXT J
38250 PUT SPRITE S1,(X1,Y1-4),8,26
38260 FOR J=750 TO 325 STEP -5:SOUND 8,J/100:NEXT J
38270 PUT SPRITE S1,(X1,Y1-4),6,27
38280 FOR J=325 TO 0 STEP -5:SOUND 8,J/100:NEXT J
38290 PUT SPRITE S1,(0,209):GOTO 43000
​
39000
39000 PRINT "Confirm action (y/n):";
39010 A$=INKEY$:IF A$="" GOTO 39010
39020 PRINT A$
39030 IF A$="y" THEN A$="Y":RETURN
39040 IF A$="n" THEN A$="N":RETURN
39050 IF A$="Y" OR A$="N" THEN RETURN
39060 GOTO 39000
​
39100
39100 IF MR(HP)=1 THEN PRINT "This will scrap armed missile"
39110 RETURN
​
39200
39200 OPEN "GRP:" FOR OUTPUT AS #1
39210 IF HP<>0 AND PA(0)=1 THEN PSET (106,29),10:PRINT#1,"A"
39220 IF HP<>1 AND PA(1)=1 THEN PSET (215,67),10:PRINT#1,"B"
39230 IF HP<>2 AND PA(2)=1 THEN PSET (20,108),10:PRINT#1,"C"
39240 CLOSE #1:POKE &HFCAF,1
39250 RETURN
​
39300
39300 OPEN "GRP:" FOR OUTPUT AS #1
39310 IF HP=0 OR PA(0)=0 GOTO 39350
39320 IF NC(0,0)>0 THEN PSET(14,22),10:PRINT#1,"1"
39330 IF NC(0,1)>0 THEN PSET(51,27),10:PRINT#1,"2"
39340 IF NC(0,2)>0 THEN PSET(84,10),10:PRINT#1,"3"
39350 IF HP=1 OR PA(1)=0 GOTO 39390
39360 IF NC(1,0)>0 THEN PSET(114,63),10:PRINT#1,"1"
39370 IF NC(1,1)>0 THEN PSET(162,68),10:PRINT#1,"2"
39380 IF NC(1,2)>0 THEN PSET(194,51),10:PRINT#1,"3"
39390 IF HP=2 OR PA(2)=0 THEN GOTO 39430
39400 IF NC(2,0)>0 THEN PSET(51,92),10:PRINT#1,"1"
39410 IF NC(2,1)>0 THEN PSET(66,109),10:PRINT#1,"2"
39420 IF NC(2,2)>0 THEN PSET(114,97),10:PRINT#1,"3"
39430 CLOSE #1:POKE &HFCAF,1:RETURN
​
39500
39500 POKE &HFCAF,2:COLOR 1:GOTO 39200
​
39600
39600 POKE &HFCAF,2:COLOR 10:GOTO 39200
​
39700
39700 POKE &HFCAF,2:COLOR 13:GOTO 39300
​
39800
39800 POKE &HFCAF,2:COLOR 10:GOTO 39300
​
40000
40000 PRESET (15,12)
40020 DRAW "C10 R15U1R4U2R23U1R55D1R8D2R7D1R10D2R17U1R6D1R3D1R3D3L1D2L2D1L19D2L7D1L3D2L1D1L5D1L3D1L1D1L1D1L2D2L1D1L2D1L3D2L16D1L3D1L1D1L5D1L49D1L12U1L3U1L3U2L14U3L2U1L1U3L2U5L1U3R2U2R1U2R2U1R1U2R2U1R4U2"
40030 PAINT (16,13),10,10
40040 PRESET (9,38)
40050 DRAW "C6 R14D2R2BD1BR4BD1R12BU1BR1R48BU1BR1R4BU1BR1U1R3BU1BR1R15BR4BU3R1U1R1BR5BU5R2U1R5BR2BU2R2BU1BR1R6U2R19"
40070
40070 PRESET (76,69)
40080 DRAW "C10 R2U4R3U1R1U1R4U1R7U1R1U1R3U1R3U1R1U1R1U1R15U1R3U1R1U1R5U1R5U1R1U1R5U1R82D1R1D2R2D1R6D2R17D1R3D1R1D2R2D1R1D3R3D5L1D4L2D2L1D1L4D1L19U1L22D2L5D1L6D1L1D1L7D1L21U2L6U1L1U1L15D1L3D1L1D2L13U1L1U1L16U1L11U2L4U1L11U1L5U2L3U1L1U1L1"
40090 PAINT (82,67),10,10
40100 PRESET (79,74)
40110 DRAW "C6 R4BR1BD1R10BR1BD1R3BR1BD2R10BR1BD1R15BR1BD1R1D1R13BR20BU2R5BR1BD2R21BR1BU1R6BR2BU2R5U1R5BR1BU2R21D1R19BR1BU1R3"
40130
40130 PRESET (7,95)
40140 DRAW "C10 R9U1R6U1R4U1R4U1R4U2R8U1R8D1R28D1R15U1R6F2R13F2R4F1R9F1R6F1R9D3R1F1D2R1G1L2D7G1L5D1L7D1L2D1L5D1L9U1L4U2L7D1L2D1L3D1G1D1L2D1L2D1L3D1L2D1L5D1L16U1L5U1L8U1L18U1L4U1L2U1L20G1L8H2U4E1U1E1R2U1E1U3L1U2L1U2L1U1E1U1"
40150 PAINT (9,97),10,10
40160 PRESET (5,117)
40170 DRAW "C6 R8E1R19BR3BD2R3F1R17F1R7F1R5D1R16E1R4BR4BU2R1BR7BU5R1BR3BU2R5BR5BD3R9E1R4BR3BU2R6E1R4"
40990 RETURN
​
41000
41000 R=INT(RND(1)*256):VPOKE BASE(12)+1,R:VPOKE BASE(12)+2049,R
41990 RETURN
​
42000
42000 IF NC(0,0)=0 THEN T=6 ELSE IF NC(0,0)<10 THEN T=4 ELSE IF NC(0,0)<50 THEN T=2 ELSE T=0
42010 PUT SPRITE 0,(20,15),1,T:PUT SPRITE 30,(20,15),15,T+1
42020 IF NC(0,1)=0 THEN T=6 ELSE IF NC(0,1)<10 THEN T=4 ELSE IF NC(0,1)<50 THEN T=2 ELSE T=0
42030 PUT SPRITE 1,(57,27),1,T:PUT SPRITE 31,(57,27),15,T+1
42040 IF NC(0,2)=0 THEN T=6 ELSE IF NC(0,2)<10 THEN T=4 ELSE IF NC(0,2)<50 THEN T=2 ELSE T=0
42050 PUT SPRITE 2,(90,3),1,T:PUT SPRITE 29,(90,3),15,T+1
42060 IF NC(1,0)=0 THEN T=6 ELSE IF NC(1,0)<10 THEN T=4 ELSE IF NC(1,0)<50 THEN T=2 ELSE T=0
42070 PUT SPRITE 4,(97,56),1,T:PUT SPRITE 27,(97,56),7,T+1
42080 IF NC(1,1)=0 THEN T=6 ELSE IF NC(1,1)<10 THEN T=4 ELSE IF NC(1,1)<50 THEN T=2 ELSE T=0
42090 PUT SPRITE 3,(168,68),1,T:PUT SPRITE 28,(168,68),7,T+1
42100 IF NC(1,2)=0 THEN T=6 ELSE IF NC(1,2)<10 THEN T=4 ELSE IF NC(1,2)<50 THEN T=2 ELSE T=0
42110 PUT SPRITE 5,(200,44),1,T:PUT SPRITE 26,(200,44),7,T+1
42120 IF NC(2,0)=0 THEN T=6 ELSE IF NC(2,0)<10 THEN T=4 ELSE IF NC(2,0)<50 THEN T=2 ELSE T=0
42130 PUT SPRITE 8,(34,85),1,T:PUT SPRITE 23,(34,85),13,T+1
42140 IF NC(2,1)=0 THEN T=6 ELSE IF NC(2,1)<10 THEN T=4 ELSE IF NC(2,1)<50 THEN T=2 ELSE T=0
42150 PUT SPRITE 6,(72,109),1,T:PUT SPRITE 25,(72,109),13,T+1
42160 IF NC(2,2)=0 THEN T=6 ELSE IF NC(2,2)<10 THEN T=4 ELSE IF NC(2,2)<50 THEN T=2 ELSE T=0
42170 PUT SPRITE 7,(120,97),1,T:PUT SPRITE 24,(120,97),13,T+1
42990 RETURN
​
43000
43000 DEFUSR=&H90:A=USR(0):RETURN
​
52000
52000 RESTORE 52100
52020 X=BASE(10)
52030 READ A:IF A=-1 THEN RETURN
52040 VPOKE X+A,0
52050 GOTO 52030
52100 DATA 8,17,26,62,88,115,122,144,150,156,161,175,184,196,204,226,231
52110 DATA 263,290,296,325,334,339,348,373,381,407,411,435,440,447,469,477,493,500,507,-1
​
53000
53000 S=BASE(9)+I*32
53020 READ A
53030 IF A=-1 THEN RETURN
53040 VPOKE S,A
53050 S=S+1
53060 IF (S MOD 32)=0 THEN PRINT ".";
53070 GOTO 53020
​
54000
54000 K=0:FOR J=0 TO 2:RY(I,J)=0:IF NC(I,J)>K THEN K=NC(I,J):C=J
54010 NEXT J
54020 T=INT(RND(1)*L)+1
54030 IF T>K THEN T=K
54040 RY(I,C)=T
54050 RETURN
​
60020
60020 DATA 255,0,48,48,49,51,63,63,50,53,55,55,63,0,255,0,255,0,0,0,36,108,252,252,124,124,124,124,252,0,255,0
60060
60060 DATA 255,0,0,0,0,1,3,7,31,39,10,18,4,0,255,0,255,0,0,112,240,176,96,192,128,28,20,28,20,0,255,0
60100
60100 DATA 255,0,7,8,19,39,47,47,47,39,19,8,7,0,255,0,255,0,192,32,144,200,232,232,232,200,148,36,198,0,255,0
60140
60140 DATA 255,0,0,0,0,0,0,1,5,14,27,54,28,8,255,0,255,0,16,56,108,216,112,160,128,12,10,10,12,0,255,0
60200
60200 DATA 255,9,37,16,9,67,55,3,49,69,9,17,3,3,255,0,255,32,72,16,32,132,216,128,16,70,37,6,132,128,255,0
60240
60250 DATA 255,0,63,0,47,0,57,0,55,0,47,0,43,0,255,0,255,0,240,0,240,0,240,0,48,7,242,2,247,0,255,0
​
60340
60340 DATA 254,130,162,130,130,130,138,130,127,65,81,65,65,65,69,65
​
60500
60500
60500
60500 DATA 252,252,181,253,173,253,181,253,213,253,253,253,0,0,0,0,15,11,239,235,109,239,171,239,237,239,239,239,0,0,0,0
60570
60570 DATA 0,0,72,0,80,0,72,0,40,0,0,0,0,0,0,0,0,4,0,4,130,0,68,0,2,0,0,0,0,0,0,0
60620
60620
60620 DATA 0,1,2,7,3,18,58,84,254,124,76,76,0,0,0,0,128,192,160,240,224,104,92,62,107,62,38,38,0,0,0,0
60680
60680 DATA 0,0,1,0,0,1,1,40,0,0,48,48,0,0,0,0,0,0,64,0,0,128,128,0,20,0,24,24,0,0,0,0
60730
60730
60730 DATA 0,0,0,16,56,108,198,0,9,28,54,99,0,0,0,0,8,28,54,99,0,32,112,216,140,0,0,0,0,0,0,0
60790
60790 DATA 0,0,0,0,0,16,56,0,0,0,8,28,0,0,0,0,0,0,8,28,0,0,0,32,112,0,0,0,0,0,0,0
60840
60840
60840 DATA 0,0,0,0,0,1,62,105,50,31,0,0,0,0,0,0,0,0,0,0,0,224,220,43,254,128,0,0,0,0,0,0
60900
60900 DATA 0,0,0,0,0,0,0,6,13,0,0,0,0,0,0,0,0,0,0,0,0,0,0,212,0,0,0,0,0,0,0,0
60950
60950
60950 DATA 0,1,1,9,9,9,9,9,9,9,10,31,0,0,0,0,128,192,192,64,192,192,64,64,220,220,180,252,0,0,0,0
61010
61010 DATA 0,0,0,0,6,0,0,0,0,0,1,0,0,0,0,0,0,0,0,128,0,0,128,128,0,8,72,0,0,0,0,0
61060
61060
61060 DATA 28,22,27,14,5,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,160,112,216,104,56,0,0,0,0,0,0
61120
61120 DATA 0,8,4,0,0,0,2,4,8,16,32,64,0,0,0,0,8,16,32,64,0,0,0,32,16,0,0,0,0,0,0,0
61170
61170
61170 DATA 0,0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
61230
61230 DATA 7,8,19,36,43,42,20,8,6,0,0,0,0,0,0,0,192,32,144,72,168,168,80,32,192,0,0,0,0,0,0,0
61280
61280
61280 DATA 0,48,48,49,51,63,51,51,63,63,63,63,0,0,0,0,0,0,0,36,108,252,108,252,252,252,252,252,0,0,0,0
61340
61340 DATA 56,1,1,0,0,0,12,12,0,0,0,0,0,0,0,0,219,182,36,0,0,0,144,0,0,0,0,0,0,0,0,0
61390
61390
61390 DATA 0,1,2,2,2,2,2,2,2,2,2,5,11,4,0,0,128,64,32,32,160,160,32,32,32,32,160,80,104,144,0,0
61450
61450 DATA 0,0,1,1,1,1,1,1,1,1,1,2,4,0,0,0,0,128,192,192,64,64,192,192,192,192,64,160,144,0,0,0
61500
61500
61500 DATA 4,11,5,2,2,2,2,2,2,2,2,2,1,0,0,0,144,104,80,160,32,32,32,32,160,160,32,32,64,128,0,0
61560
61560 DATA 0,4,2,1,1,1,1,1,1,1,1,1,0,0,0,0,0,144,160,64,192,192,192,192,64,64,192,192,128,0,0,0
61610
61610
61610 DATA 0,0,0,0,0,0,31,32,70,32,31,0,0,0,0,0,0,0,0,0,4,10,244,12,18,12,244,10,4,0,0,0
61670
61670 DATA 0,0,0,0,0,0,0,31,57,31,0,0,0,0,0,0,0,0,0,0,0,4,8,240,236,240,8,4,0,0,0,0
61720
61720
61720 DATA 0,0,0,0,32,80,47,48,72,48,47,80,32,0,0,0,0,0,0,0,0,0,248,4,98,4,248,0,0,0,0,0
61780
61780 DATA 0,0,0,0,0,32,16,15,55,15,16,32,0,0,0,0,0,0,0,0,0,0,0,248,156,248,0,0,0,0,0,0
61830
61830
61830 DATA 0,0,0,0,0,0,0,0,0,0,0,0,3,7,7,3,0,0,0,0,0,0,0,0,0,0,0,0,224,240,240,224
61890
61890
61890 DATA 0,0,0,0,0,0,0,0,1,3,7,12,11,7,31,31,0,0,0,0,0,0,0,0,192,224,240,152,232,240,252,252
61950
61950
61950 DATA 0,0,0,0,7,15,31,26,13,7,7,12,9,1,15,127,0,0,0,0,248,252,254,242,206,248,240,152,200,192,248,254
62010
62010
62010 DATA 0,15,31,127,127,255,255,127,31,7,4,12,9,1,15,255,0,248,254,254,255,255,255,255,255,250,144,152,200,192,248,255
62020
62020
62020 DATA 13,18,114,142,129,128,136,71,64,64,32,16,16,8,15,0,176,76,74,73,73,201,183,1,1,1,2,2,2,4,252,0
62030
62030 DATA 0,13,13,113,126,127,119,56,63,63,31,15,15,7,0,0,0,176,180,182,182,54,72,254,254,254,252,252,252,248,0,0
62070 DATA -1
​
63000
63000 DATA 255,16,16,16,16,16,16,16
63020 DATA 16,16,16,16,16,16,255,0
63030
63030 DATA 255,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0
​
65500 POKE &HF3B1,24:SCREEN 0:COLOR 15,4,4:WIDTH 40