Code: Select all
0 rem -donkeysoft mmxiv donkeysoft mmxiv donkeysoft mmxiv donkeysoft mmxiv donkeysoft mmxiv donkeys--
1 dim a,b,c,i,n,s,t,x,y,z,a$,n$:poke 53280,z:poke 53281,z:print"{clear}{gray} {reverse on} minesweep mini (c) donkeysoft mmxiv {reverse off}"chr$(13)"{down} ";:a$="----------":a=rnd(z):b=2055:c=65:n=48:x=45:y=44:t=98:for i=z to t:poke b+i,x:next
2 s=1145:for i=z to 9:print chr$(n+i);:next:print:for i=z to 9:print chr$(c+i);a$:next:for i=z to 9
3 a=rnd(z)*t:on-(peek(b+a)=y) goto 3:poke b+a,y:next:print:a=40:i=32:t=y
4 print"enter row then column"chr$(13)"> {left}{left}{reverse on} {reverse off}{left}";
5 get a$:on-(a$<"a" or a$>"j")goto 5:y=asc(a$)-c:print a$;"{reverse on} {reverse off}{left}";:n$=chr$(asc(a$)-17)
6 get a$:on-(a$<"0" or a$>"9")goto 6:x=val(a$):print a$
7 n$=n$+a$:on (peek(b+val(n$))-43) gosub 12,8:print"{up}{up}";:goto 4
8 n=z:poke s+x+y*a,32:for i=y-1 to y+1: for t=x-1 to x+1:if i=>z and i<=9 and t=>0 and t<=9 then n=n-(peek(b+i*10+t)<>45)
9 next t,i:if n then poke s+x+y*a,49+n
10 return
12 poke s+x+y*a,86:return
It generates the Minefield 'map' in the REM statement in line zero, so that needs to stay the same or some of the listing will be over-written with some characters. Or at least keep it to 101 characters after the REM statement.
After a quick test, I think it works.
Regards,
Shaun.