cls:f=8 dim a(f),b(f),c(f) print @f,"M A S T E R M I N D" print:print "Ladislav Tomecek Software Hardware (tm)" print:print "Programed on Tuesday 12-31-91" randomize 7 print repeat input "Positions (3,4 ... 8) ",p until p>=3 and p<=f for i=1 to p c(i)=int(8*rnd+1) next print "Put numbers down:":s=0 repeat s=s+1:print s, for i=1 to p:a(i)=c(i):next 9 t$="":for i=1 to p 10 a$=inkey$:if a$="" then 10 if asc(a$)<49 or asc(a$)>57 then 10 t$=t$+a$:print a$;:next:print " "; z=0:v=0 for i=1 to p b(i)=val(mid$(t$,i,1)) if b(i)=a(i) then z=z+1:b(i)=-1:a(i)=-2 next for i=1 to p for j=1 to p if b(i)=a(j) then v=v+1:a(j)=-2:j=p next:next for i=1 to z:print chr$(2);:next for i=1 to v:print chr$(1);:next print until z=p or s=10 if z=p then print "You win on ";s;" moves!":goto 18 print:print "XX", for i=1 to p:print c(i);:next:print print "You don't win!" 18 input "Repete? (Y,N) ",r$ if r$="Y" or r$="y" then 7 if r$="N" or r$="n" then 20 goto 18 20 cls:print @177,"Bye..." end