Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
A jam submission

World's Hardest 15-PuzzleView game page

A 15-puzzle were all pieces are identical but each has its own destination.
Submitted by ElGregos (@GregosEl) — 17 hours, 42 minutes before the deadline
Add to collection

Play game

World's Hardest 15-Puzzle's itch.io page

How many characters of code did you use?
552

Include your code here, if you'd like to show it off!
function m(b)
s=u+({1,-1,4,-4})[b+1]
if((b<2and u\4==s\4)or(b>1and s>=0and s<16))t[s+1],t[u+1]=t[u+1],t[s+1]u=s
end
i="\^y9world's hardest\n\^t\^w\-a15-puzzle"t={}h=rnd(16)\1u=h
for n=0,15 do
add(t,n)end
for n=0,999do m(rnd(4)\1)end::_::cls(4)
?i,34,14,2
?i,35,13,9
for n=-1,#t-1 do
l=-2x=30y=38w=66k=0d=2j=0c=circ
if(n>-1)x=n%4*16+32y=(n-n%4)*4+40l=t[n+1]w=14k=2j=4d=1
if(l==n)k=9j=10d=4c=circfill
if(l==h)w=12k=1j=1d=1y+=2
rectfill(x,y,x+w,y+w,k)
for o=0,3do pset(x+o%2*w,y+o\2*w,d)end c(x+7,y+7,3,j)
end
for b=0,3 do
if(btnp(b))m(b)
end
flip()goto _

Leave a comment

Log in with itch.io to leave a comment.

Comments

No one has posted a comment yet