alexthescott.bad coin flip

-- bad coin flip
-- alexthescott 
-- 7/30/21

t=0
pa={-15,13,-4,12}
pal(pa,1)
cls()
c=1
b=1

::♥::
ovalfill(15,15,112,112,c-1)
if b == 1 then
	for p=0,4000 do pset(rnd(128),rnd(128),0)end
else 
	for p=0,5000 do pset(rnd(128),rnd(128),7)end
end

ovalfill(31,31,96,96,c)
for i=1, 8 do
	s=i*32
	p=s/2*(1+cos(t+i/25))/2
	if b == 1 then
		oval(64+p,0+s/2,64-p,127-s/2,7)
		oval(0+s/2,64+p,127-s/2,64-p)
	else 
		oval(64+p,0+s/2,64-p,127-s/2,0)
		oval(0+s/2,64+p,127-s/2,64-p,0)
	end
end
t+=0.005

if btnp(0) then
	c-=1
elseif btnp(1) then
	c+=1
end

if c==0 then
	c=#pa
	b*=-1
elseif c==#pa+1 then
	c=2
	b*=-1
end
flip()
goto ♥