alexthescott.bad sort

-- bad sort
-- alexthescott
-- 22/1/21 2:10pm

-- arctic water
p1={[0]=129,1,131,140,12}
-- salty crimson
p2={[0]=130,2,136,8,7}
-- newspaper
p3={[0]=0,5,134,6,7}
-- nerds
p4={[0]=141,14,142,137,9,135}
-- gmo spider
p5={[0]=129,1,2,136,8}
-- slime green
p6={[0]=3,139,11,138,135}
-- 80s sd
p7={[0]=128,132,4,137,9}

-- new seed every day of the year 
srand(31*stat(81)+stat(82)) 

p={p1,p2,p3,p4,p5,p6,p7}
c=rnd(p)
pal(c,1)

function cmp(a,b,d)
 -- d==0 is pixel color a>b
 -- d==1 is pixel color a=128or b[1]>=128)return false
 if d==0 then
 	return pget(a[1],a[2])>pget(b[1],b[2])
	else
		return pget(a[1],a[2])0 then
	play-=1
elseif auto>0 then
	auto-=1
else
	d*=-1
	h=rnd()<0.5
	auto=900+rnd(900)\1
end

goto ♥