Follow

-- an explorable mess in (reload for a new mess)
b=btn
cls(1)
ps={}
for _=0,flr(rnd(25)) do
add(ps,{flr(rnd(128)),flr(rnd(128))})
end
for p in all(ps) do
for q in all(ps) do
line(p[1],p[2],q[1],q[2],0)
x,y=q[1],q[2]
end
end
pset(x,y,3)
function _update()
x_,y_=x,y
if(b(⬅️))x_-=1
if(b(➡️))x_+=1
if(b(⬆️))y_-=1
if(b(⬇️))y_+=1
if pget(x_,y_)==0 then
pset(x_,y_,3)
x,y=x_,y_
end
end

· · Web · 0 · 0 · 1
Sign in to participate in the conversation
Mastodon

Server run by the main developers of the project 🐘 It is not focused on any particular niche interest - everyone is welcome as long as you follow our code of conduct!