randomize:cls:locate 4,9,0 print "The fifteen V2.0 1992" print @265,"Press any key!":wait:cls dim a(4,4),tt(4,4),b$(4),s$(1) 29 box 1,1,8,18,1:box 1,19,8,37,1 box 2,32,4,36,1 box 1,38,8,40,1:locate 3,21,1 print "Wait! ":print @118,"L" print @158,"T":print @198,"S" print @238,"H":print @264,"H - help" for i=1 to 4:for j=1 to 4 if 4*(i-1)+j < 10 then a(i,j)=4*(i-1)+j if 4*(i-1)+j >= 10 then a(i,j)=4*(i-1)+j next:next:s=4:r=4 39 b$(1)="U":b$(2)="D":b$(3)="R":b$(4)="L" p=int(199*rnd)+1:p1=0:print @219," " 46 w$=b$(int(rnd*4+1)):gosub 120 if ok=1 then p1=p1+1:print @225,using "%3.0f";p-p1 if p1

";:locate 3,22 repeat:w$=inkey$:until len(w$)>0 w$=ucase$(w$):gosub 148 if w$="E" then 150 if w$="N" then 29 if w$="H" then scrsave s$(0):gosub 160:goto 70 if w$<>"O" then 84 75 for i=1 to 4:for j=1 to 4 a(i,j)=tt(i,j):next:next r=r1:s=s1:t=-1:goto 88 84 gosub 120:if ok=1 then 88 beep:goto 70 88 gosub 110:c=1 for i=1 to 4:for j=1 to 4:u=4*(i-1)+j if a(i,j) <> u then c=0 next:next:if c=0 then 61 errwin 4,10,"Congratulation!" 102 print @100,"> "; print @219,"( , , , ,E,O,N,H)":locate 3,22 repeat:w$=inkey$:until len(w$)>0 w$=ucase$(w$):gosub 148 if w$="E" then 150 if w$="N" then 29 if w$="O" then 75 if w$="H" then scrsave s$(0):gosub 160:goto 102 beep:goto 102 110 for u=1 to 4:for q=1 to 4 if a(u,q)=16 then locate u+2,q*4-1:print " " if a(u,q)<>16 then locate u+2,q*4-1:print using "%2.0f";a(u,q) next:next:return 120 ok=1 if w$="D" and r>1 then 131 if w$="U" and r<4 then 135 if w$="R" and s>1 then 139 if w$="L" and s<4 then 143 ok=0:return 131 a(r,s)=a(r-1,s):a(r-1,s)=16 r=r-1:return 135 a(r,s)=a(r+1,s):a(r+1,s)=16 r=r+1:return 139 a(r,s)=a(r,s-1):a(r,s-1)=16 s=s-1:return 143 a(r,s)=a(r,s+1):a(r,s+1)=16 s=s+1:return 148 print @101,w$; if w$="U" then print "p" if w$="D" then print "own" if w$="L" then print "eft" if w$="R" then print "ight" if w$="E" then print "nd" if w$="O" then print "ld game" if w$="N" then print "ew game" if w$="H" then print "elp" return 150 cls:print @177,"Bye...":end 160 cls box 1,1,8,40,1:print @17," Help " print @41,"U up D down" print @81,"L left R right" print @121,"N new game O old game" print @161,"E end H help" print @266,"Press a key":wait print @41,"This program can be copied freely." print @81,"Send me DM10 ($5,”S50,...), I'11 send" print @121,"you new version and other programs" print @161,"on the 5¬ diskette. " wait:cls box 1,1,8,40,1:print @15," My adress " print @92,"TOMECEK Ladislav ml." print @132,"Dobrotice 138" print @172,"769 01 HOLESOV" print @212,"Czechoslovakia" wait:scrload s$(0):return