5 print"stop tape and please wait..." 6 poke 55,0:poke56,60:clr 7 poke1177,62 10 fori=0to1023 11 poke60*256+i,peek(53248+i) 12 nexti 15 poke1177,63 20 poke65299,60 21 poke65298,192 75 fori=(60*256)+(33*8)to(60*256)+((33*8)+7):reada:pokei,a:nexti:data0,3,7,15,12,27,5,55 80 fori=(60*256)+(62*8)to(60*256)+((62*8)+7):reada:pokei,a:nexti:data0,198,228,118,148,214,164,239 81 fori=(60*256)+(61*8)to(60*256)+((61*8)+7):reada:pokei,a:nexti:data0,126,122,126,185,181,88,37 82 fori=(60*256)+(60*8)to(60*256)+((60*8)+7):reada:pokei,a:nexti:data0,246,54,192,80,128,56,180 83 fori=(60*256)+(35*8)to(60*256)+((35*8)+7):reada:pokei,a:nexti:data8,44,69,107,73,42,77,39 84 fori=(60*256)+(37*8)to(60*256)+((37*8)+7):reada:pokei,a:nexti:data16,52,162,214,146,84,178,228 85 fori=(60*256)+(39*8)to(60*256)+((39*8)+7):reada:pokei,a:nexti:data91,31,47,47,42,5,56,92 86 fori=(60*256)+(63*8)to(60*256)+((63*8)+7):reada:pokei,a:nexti:data218,248,228,212,164,64,28,58 87 fori=(60*256)+(47*8)to(60*256)+((47*8)+7):reada:pokei,a:nexti:data0,122,83,102,76,89,114,0 150 rem inicio 180 dimf(8,8) 190 printchr$(147):color0,1:color1,5,4:color4,1 200 print "{home} knights & demons":print" a game by kabuto factory" 210 print:print:print " c16-plus4 version by manuel gomez":print:print:print:print:print" 1. easy level":print" 2. medium level":print" 3. hard level" 225 geta$ 230 ifa$="1"thendi=1:goto270 240 ifa$="2"thendi=2:goto270 250 ifa$="3"thendi=3:goto270 260 ifa$=""then225 270 rem varglob 280 x=1:y=1:su=0:ba=16 290 rem varfase 300 ifdi=1thenca=10:t=200:p=5 310 ifdi=2thenca=20:t=300:p=15 320 ifdi=3thenca=30:t=400:p=10 330 ifba<8orba>23thengoto1370 340 gosub1040 350 rem bucle 355 geta$ 360 ifa$="o"andx>1thend=1:gosub650:goto420 370 ifa$="p"andx<8thend=2:gosub650:goto420 380 ifa$="q"andy>1thend=3:gosub650:goto420 390 ifa$="a"andy<8thend=4:gosub650:goto420 400 ifa$="m"thend=4:gosub740:goto420 410 ifa$="z"andp>0thengosub570:p=p-1:goto420 420 t=t-.1 440 rem cond 450 ifint(t)=0thengoto1340 460 ifsu=64orsu=128thengoto500 470 color1,5,4:print"{home}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{right}time:";int(t);"{left}/";tab(20);"pikes:";p;"{left}/":color1,2 490 goto350 500 rem pasa 510 ifsu=64thenchar1,5,22,"board clear. good side":ba=ba-1:su=0:x=1:y=1:goto530 520 ifsu=128thenchar1,5,22,"board clear. evil side":ba=ba+1:su=0:x=1:y=1:goto530 530 ifdi=1thent=200 540 ifdi=2thent=300 550 ifdi=3thent=400 560 geta$:ifa$=""then560 561 goto330 570 rem pica 580 iff(x,y)=1thenf(x,y)=2:su=su+1:goto600 590 iff(x,y)=2thenf(x,y)=1:su=su-1:goto600 600 iff(x,y)=1thengosub2100 620 iff(x,y)=2thengosub2150 625 poke2048+(8+2*(x-1))+40*(3+2*(y-1)),117:poke2048+((8+2*(x-1))+1)+40*(3+2*(y-1)),117:poke2048+(8+2*(x-1))+40*((3+2*(y-1))+1),117:poke2048+((8+2*(x-1))+1)+40*((3+2*(y-1))+1),117 640 return 650 rem cursor 660 iff(x,y)=1thengosub2100 670 iff(x,y)=2thengosub2150 680 ifd=1thenx=x-1 690 ifd=2thenx=x+1 700 ifd=3theny=y-1 710 ifd=4theny=y+1 720 poke2048+(8+2*(x-1))+40*(3+2*(y-1)),117:poke2048+((8+2*(x-1))+1)+40*(3+2*(y-1)),117:poke2048+(8+2*(x-1))+40*((3+2*(y-1))+1),117:poke2048+((8+2*(x-1))+1)+40*((3+2*(y-1))+1),117 730 return 740 rem cambia 750 rem rutcambio 760 iff(x,y)=1thenf(x,y)=2:su=su+1:goto780 770 iff(x,y)=2thenf(x,y)=1:su=su-1:goto780 780 ify>1thengoto1520 790 ify>1thengoto1530 800 ify<8thengoto1540 810 ify<8thengoto1550 820 ifx>1thengoto1560 830 ifx>1thengoto1570 840 ifx<8thengoto1580 850 ifx<8thengoto1590 860 rem rutpinta 880 iff(x,y)=1thengosub2100 890 iff(x,y)=2thengosub2150 900 ify>1thengosub2200 910 ify>1thengoto1430 920 ify>1thengoto1440 930 ify<8thengosub2250 940 ify<8thengoto1450 950 ify<8thengoto1460 960 ifx>1thengosub2300 970 ifx>1thengoto1470 980 ifx>1thengoto1480 990 ifx<8thengosub2350 1000 ifx<8thengoto1490 1010 ifx<8thengoto1500 1020 poke2048+(8+2*(x-1))+40*(3+2*(y-1)),117:poke2048+((8+2*(x-1))+1)+40*(3+2*(y-1)),117:poke2048+(8+2*(x-1))+40*((3+2*(y-1))+1),117:poke2048+((8+2*(x-1))+1)+40*((3+2*(y-1))+1),117 1030 return 1040 rem tablero 1050 printchr$(147):print"{home}a new battle begins..." 1060 forr=1to8:forc=1to8 1070 f(c,r)=1:su=su+1 1080 nextc:nextr 1090 forn=1toca 1100 r=int(rnd(1)*8)+1:c=int(rnd(1)*8)+1 1110 iff(c,r)=1thenf(c,r)=2:su=su+1:goto1130 1120 iff(c,r)=2thenf(c,r)=1:su=su-1:goto1130 1130 ifr>1theniff(c,r-1)=1thenf(c,r-1)=2:su=su+1:goto1150 1140 ifr>1theniff(c,r-1)=2thenf(c,r-1)=1:su=su-1:goto1150 1150 ifr<8theniff(c,r+1)=1thenf(c,r+1)=2:su=su+1:goto1170 1160 ifr<8theniff(c,r+1)=2thenf(c,r+1)=1:su=su-1:goto1170 1170 ifc>1theniff(c-1,r)=1thenf(c-1,r)=2:su=su+1:goto1190 1180 ifc>1theniff(c-1,r)=2thenf(c-1,r)=1:su=su-1:goto1190 1190 ifc<8theniff(c+1,r)=1thenf(c+1,r)=2:su=su+1:goto1210 1200 ifc<8theniff(c+1,r)=2thenf(c+1,r)=1:su=su-1:goto1210 1210 nextn 1220 printchr$(147):color1,9,4:forn=0to23:print"////////////////////////////////":nextn:color1,2 1227 print"{home}{right}{right}{right}{right}{right}{right}{right}{right}----------------";chr$(35);chr$(37) 1228 print"{right}{right}{right}{right}{right}{right}{right}{right}----------------";chr$(39);chr$(63) 1230 char1,6,0,chr$(33)+chr$(62):char1,6,1,chr$(61)+chr$(60) 1240 char1,ba,0,chr$(47):char1,ba,1,chr$(47) 1260 forr=1to8 1270 forc=1to8 1280 iff(c,r)=1thengosub2000 1290 iff(c,r)=2thengosub2050 1300 nextc 1310 nextr 1320 poke2048+(8+2*(x-1))+40*(3+2*(y-1)),117:poke2048+((8+2*(x-1))+1)+40*(3+2*(y-1)),117:poke2048+(8+2*(x-1))+40*((3+2*(y-1))+1),117:poke2048+((8+2*(x-1))+1)+40*((3+2*(y-1))+1),117 1330 return 1340 rem gameover 1350 print"{home}{down}{down}{down}{down}{down}{down}{down}{down}{down}{down}{right}{right}{right}{right}{right}{right}{right}{right}{right}{right}{right}{right}game over" 1360 geta$:ifa$=""then1360 1361 goto190 1370 rem final 1380 ifba>23thenprintchr$(147):print"you have finished with the bad guys":print"welcometothe dark side":forn=0to5000:nextn:goto190 1390 ifba<8anddi=1thenprintchr$(147):print"you have finished the game":print"... but try with a harder level.":forn=0to5000:nextn:goto190 1400 ifba<8anddi=2thenprintchr$(147):print"you have finished the game":print"... but try with a harder level.":forn=0to5000:nextn:goto190 1410 ifba<8anddi=3thenprintchr$(147):print"you have mastered the game...":print"thanks for playing...":forn=0to5000:nextn:goto190 1420 rem pifs 1430 iff(x,y-1)=1thengosub2400:goto930 1440 iff(x,y-1)=2thengosub2450:goto930 1450 iff(x,y+1)=1thengosub2500:goto960 1460 iff(x,y+1)=2thengosub2550:goto960 1470 iff(x-1,y)=1thengosub2600:goto990 1480 iff(x-1,y)=2thengosub2650:goto990 1490 iff(x+1,y)=1thengosub2700:goto1020 1500 iff(x+1,y)=2thengosub2750:goto1020 1510 rem cifs 1520 iff(x,y-1)=1thenf(x,y-1)=2:su=su+1:goto800 1530 iff(x,y-1)=2thenf(x,y-1)=1:su=su-1:goto800 1540 iff(x,y+1)=1thenf(x,y+1)=2:su=su+1:goto820 1550 iff(x,y+1)=2thenf(x,y+1)=1:su=su-1:goto820 1560 iff(x-1,y)=1thenf(x-1,y)=2:su=su+1:goto840 1570 iff(x-1,y)=2thenf(x-1,y)=1:su=su-1:goto840 1580 iff(x+1,y)=1thenf(x+1,y)=2:su=su+1:goto860 1590 iff(x+1,y)=2thenf(x+1,y)=1:su=su-1:goto860 2000 char1,(8+2*(c-1)),(3+2*(r-1)),chr$(33)+chr$(62):char1,(8+2*(c-1)),((3+2*(r-1))+1),chr$(61)+chr$(60) 2010 poke2048+(8+2*(c-1))+40*(3+2*(r-1)),120:poke2048+((8+2*(c-1))+1)+40*(3+2*(r-1)),120:poke2048+(8+2*(c-1))+40*((3+2*(r-1))+1),70:poke2048+((8+2*(c-1))+1)+40*((3+2*(r-1))+1),65 2020 return 2050 char1,(8+2*(c-1)),(3+2*(r-1)),chr$(35)+chr$(37):char1,(8+2*(c-1)),((3+2*(r-1))+1),chr$(39)+chr$(63) 2060 poke2048+(8+2*(c-1))+40*(3+2*(r-1)),66:poke2048+((8+2*(c-1))+1)+40*(3+2*(r-1)),34:poke2048+(8+2*(c-1))+40*((3+2*(r-1))+1),66:poke2048+((8+2*(c-1))+1)+40*((3+2*(r-1))+1),34 2070 return 2100 char1,(8+2*(x-1)),(3+2*(y-1)),chr$(33)+chr$(62):char1,(8+2*(x-1)),((3+2*(y-1))+1),chr$(61)+chr$(60) 2110 poke2048+(8+2*(x-1))+40*(3+2*(y-1)),120:poke2048+((8+2*(x-1))+1)+40*(3+2*(y-1)),120:poke2048+(8+2*(x-1))+40*((3+2*(y-1))+1),70:poke2048+((8+2*(x-1))+1)+40*((3+2*(y-1))+1),65 2120 return 2150 char1,(8+2*(x-1)),(3+2*(y-1)),chr$(35)+chr$(37):char1,(8+2*(x-1)),((3+2*(y-1))+1),chr$(39)+chr$(63) 2160 poke2048+(8+2*(x-1))+40*(3+2*(y-1)),66:poke2048+((8+2*(x-1))+1)+40*(3+2*(y-1)),34:poke2048+(8+2*(x-1))+40*((3+2*(y-1))+1),66:poke2048+((8+2*(x-1))+1)+40*((3+2*(y-1))+1),34 2170 return 2200 return 2250 return 2300 return 2350 return 2400 char1,(8+2*(x-1)),((3+2*(y-1))-2),chr$(33)+chr$(62):char1,(8+2*(x-1)),((3+2*(y-1))-1),chr$(61)+chr$(60) 2410 poke2048+(8+2*(x-1))+40*((3+2*(y-1))-2),120:poke2048+((8+2*(x-1))+1)+40*((3+2*(y-1))-2),120:poke2048+(8+2*(x-1))+40*((3+2*(y-1))-1),70:poke2048+((8+2*(x-1))+1)+40*((3+2*(y-1))-1),65 2420 return 2450 char1,(8+2*(x-1)),((3+2*(y-1))-2),chr$(35)+chr$(37):char1,(8+2*(x-1)),((3+2*(y-1))-1),chr$(39)+chr$(63) 2460 poke2048+(8+2*(x-1))+40*((3+2*(y-1))-2),66:poke2048+((8+2*(x-1))+1)+40*((3+2*(y-1))-2),34:poke2048+(8+2*(x-1))+40*((3+2*(y-1))-1),66:poke2048+((8+2*(x-1))+1)+40*((3+2*(y-1))-1),34 2470 return 2500 char1,(8+2*(x-1)),((3+2*(y-1))+2),chr$(33)+chr$(62):char1,(8+2*(x-1)),((3+2*(y-1))+3),chr$(61)+chr$(60) 2510 poke2048+(8+2*(x-1))+40*((3+2*(y-1))+2),120:poke2048+((8+2*(x-1))+1)+40*((3+2*(y-1))+2),120:poke2048+(8+2*(x-1))+40*((3+2*(y-1))+3),70:poke2048+((8+2*(x-1))+1)+40*((3+2*(y-1))+3),65 2520 return 2550 char1,(8+2*(x-1)),((3+2*(y-1))+2),chr$(35)+chr$(37):char1,(8+2*(x-1)),((3+2*(y-1))+3),chr$(39)+chr$(63) 2560 poke2048+(8+2*(x-1))+40*((3+2*(y-1))+2),66:poke2048+((8+2*(x-1))+1)+40*((3+2*(y-1))+2),34:poke2048+(8+2*(x-1))+40*((3+2*(y-1))+3),66:poke2048+((8+2*(x-1))+1)+40*((3+2*(y-1))+3),34 2570 return 2600 char1,(8+2*((x-1)-1)),(3+2*(y-1)),chr$(33)+chr$(62):char1,(8+2*((x-1)-1)),((3+2*(y-1))+1),chr$(61)+chr$(60) 2610 poke2048+(8+2*((x-1)-1))+40*(3+2*(y-1)),120:poke2048+((8+2*((x-1)-1))+1)+40*(3+2*(y-1)),120:poke2048+(8+2*((x-1)-1))+40*((3+2*(y-1))+1),70:poke2048+((8+2*((x-1)-1))+1)+40*((3+2*(y-1))+1),65 2620 return 2650 char1,(8+2*((x-1)-1)),(3+2*(y-1)),chr$(35)+chr$(37):char1,(8+2*((x-1)-1)),((3+2*(y-1))+1),chr$(39)+chr$(63) 2660 poke2048+(8+2*((x-1)-1))+40*(3+2*(y-1)),66:poke2048+((8+2*((x-1)-1))+1)+40*(3+2*(y-1)),34:poke2048+(8+2*((x-1)-1))+40*((3+2*(y-1))+1),66:poke2048+((8+2*((x-1)-1))+1)+40*((3+2*(y-1))+1),34 2670 return 2700 char1,(8+2*((x-1)+1)),(3+2*(y-1)),chr$(33)+chr$(62):char1,(8+2*((x-1)+1)),((3+2*(y-1))+1),chr$(61)+chr$(60) 2710 poke2048+(8+2*((x-1)+1))+40*(3+2*(y-1)),120:poke2048+((8+2*((x-1)+1))+1)+40*(3+2*(y-1)),120:poke2048+(8+2*((x-1)+1))+40*((3+2*(y-1))+1),70:poke2048+((8+2*((x-1)+1))+1)+40*((3+2*(y-1))+1),65 2720 return 2750 char1,(8+2*((x-1)+1)),(3+2*(y-1)),chr$(35)+chr$(37):char1,(8+2*((x-1)+1)),((3+2*(y-1))+1),chr$(39)+chr$(63) 2760 poke2048+(8+2*((x-1)+1))+40*(3+2*(y-1)),66:poke2048+((8+2*((x-1)+1))+1)+40*(3+2*(y-1)),34:poke2048+(8+2*((x-1)+1))+40*((3+2*(y-1))+1),66:poke2048+((8+2*((x-1)+1))+1)+40*((3+2*(y-1))+1),34 2770 return