Second Try.
Set Display Mode 1024, 768, 16 : Set Text Size 48 : Autocam Off : Color Backdrop RGB(0,0,0) : Make Light 1
Position Camera 80, 50, -50.0 : Position Light 1, Camera Position Y(), Camera Position Y(), Camera Position Z() : Point Light 1, Camera Position Y(), Camera Position Y(), Camera Position Z()+100.0 : Dim Prop(16,2) : For D=1 To 15
Repeat : I=1+Rnd(14) : Until Not Object Exist(I) : Make Object Box I, 30, 30, 10 : Position Object I, 0.0+35*(D-((D-1)/4)*4), 110.0-35*((D-1)/4), 100
Box 1, 1, 90, 90, Rgb(Rnd(255), Rnd(255), Rnd(255)), Rgb(Rnd(255), Rnd(255), Rnd(255)), Rgb(Rnd(255), Rnd(255), Rnd(255)), Rgb(Rnd(255), Rnd(255), Rnd(255))
Center Text 45, 25, Str$(I) : Get Image I, 1, 1, 90, 90 : Texture Object I, I : Box 1, 1, 90, 90, RGB(0,0,0), RGB(0,0,0), RGB(0,0,0), RGB(0,0,0) : Prop(I,1)=D
Next D : Set Text Font "Comic Sans MS" : Set Text Size 24 : Set Text To Bold : Ink RGB(0,255,0), 0
Prop(16,1)=16 : Sync Rate 0 : Sync On : Do : Obj=0
Win=1 : For I=1 To 15 : If I <> Prop(I,1) : Win=0 : EndIf
Next I : If Win : Center Text Screen Width()/2, Screen Height()/2, "Game Complete!" : Sync : Wait Key
End : EndIf : If MouseClick() And Make Vector3(1)+Make Vector3(2)+Make Matrix4(3) : For I=1 To 15 : View Matrix4 3
r#=Inverse Matrix4(3, 3) : Set Vector3 1, 1000.0*((-1.0*(1.0-2.0*(MouseX()*1.0)/(Screen Width()*1.0))*1.3333333333333333)*0.6000381120986), 1000.0*((1.0-2.0*(MouseY()*1.0)/(Screen Height()*1.0))*0.6000381120986), 1000.0 : Transform Coords Vector3 2, 1, 3 : If Intersect Object(I, Camera Position X(), Camera Position Y(), Camera Position Z(), X Vector3(2), Y Vector3(2), Z Vector3(2)) > 0.0 : Obj=I
EndIf: Next I : EndIf : If Obj > 0 : If Prop(Obj, 1)-1=Prop(16, 1) Or Prop(Obj, 1)+1=Prop(16, 1) Or Prop(Obj, 1)-4=Prop(16, 1) Or Prop(Obj, 1)+4=Prop(16, 1)
Temp=Prop(Obj, 1) : Position Object Obj, 0.0+35*(Prop(16, 1)-((Prop(16, 1)-1)/4)*4), 110.0-35*((Prop(16, 1)-1)/4), 100 : Prop(Obj, 1)=Prop(16, 1) : Prop(16, 1)=Temp : Inc Steps
EndIf : EndIf : Text 10, 10, "PYATNASHKI by DMiTR0S: FPS ="+Str$(Screen FPS())+Chr$(10)+"Steps: "+Str$(Steps) : Sync : Loop