a=add r=rnd _a=true _b=true m=false
_c=128 _d='1.2.2' function _e(tb,v)
local _f={}
for vl in all(tb)do
_f[vl]=true end
return _f[v]end
d={[0]=0,0,1,1,2,1,13,6,2,4,9,3,13,5,8,14} _g={3,6,7,9,10}
_h={}
cs=split('𝘣𝘤𝘥𝘧𝘨𝘩𝘫𝘬𝘭𝘮𝘯𝘱𝘲𝘳𝘴𝘵𝘷𝘸𝘹𝘺𝘻','')
vs=split('𝘢𝘦𝘪𝘰𝘶','')
for v in all(vs)do
for ov in all(vs)do
a(_h,v..ov)end end
for c in all(cs)do
for v in all(vs)do
a(_h,c..v)a(_h,c..v..'𝘯')end end
function gn(l)
local _i='' local l=l or 3
for i=1,flr(r(l)+2)do
_i..=r(_h)end
return _i end
_m=gn(2)
cn={}
for i=1,flr(r(2)+2)do
a(cn,{gn(1),false})end
r(cn)[2]=true
_n={{7,6},{15,9},{11,3}}
_o={,,{2,4}}
ps={}
bm={}
for i=1,flr(_c/27)do
a(bm,{x=r(96)+16,y=r(96)+16,c=r(_n)})end
for i=1,flr(_c/54)do
a(bm,{x=r(96)+16,y=r(96)+16,c=r(_o)})end
for x=0,4do
a(bm,{x=x*31.75,y=0,c=})
a(bm,{y=x*31.75,x=0,c=})
a(bm,{x=x*31.75,y=127,c=})
a(bm,{y=x*31.75,x=127,c=})end
function _j(x1,y1,x2,y2)
local _p=sqrt(((x2-x1)^2)+(y2-y1)^2)
if(_p<0)return 0x7fff.ffff
if(_p>=0)return _p end
function _k(x,y)
local _q=0x7fff.ffff
local _l=nil
local _r=0
for i=1,#bm do
if _j(x,y,bm[i].x,bm[i].y)<_q then
_q=_j(x,y,bm[i].x,bm[i].y)
_l=bm[i]
_r=r(bm[i].c)end end
return _r end
for i=1,_c do
local px=r(128)
local py=r(128)
a(ps,{x=px,y=py,c=_k(px,py)})end
for c in all(cn)do
_s=nil
while not _s do
_t=flr(r(_c)+1)
p=ps[_t]
if(_t%2==0and r()<0.25and p.x<100and p.y<110and _k(p.x,p.y)!=12)_s=_t
end
p.n=c end
function _l(x,y)
local _q=0x7fff.ffff
local _l=nil
local _r=0
for i=1,#ps do
if _j(x,y,ps[i].x,ps[i].y)<_q then
_q=_j(x,y,ps[i].x,ps[i].y)
_l=ps[i]
if(not _a)_r=i&0xff
if(_a)_r=i%2==0 and _l.c+_l.c*16 or 0xcc
end end
return _r end
cls()
for p in all(ps)do
pset(p.x,p.y,p.n and 10or 6)end
for p in all(bm)do
pset(p.x,p.y,8)end
spr(0,51,62,5,3)
print('\#7v' .._d,52,80,0)
print('\#7travelling to:',73,1,0)
print('\#7' .._m,128-#_m*4,7,0)
for i=0,15do if not _e(_g,i) then pal(i,128+i,1)end end
for y=127,0,-1do
for x=127,0,-1do
fillp(0b0101101001011010)
local _v=_l(x,y)
rectfill(x,y,x,y,_v)
if(btnp(🅾️))m=true
end end
fillp()
for i=1,flr(_c/2.4)do
for x=0,127do for y=0,127do
if(r()<0.025and pget(x,y)!=0)circfill(x,y,1,pget(x,y))
end end end
function _u()
if _b then
for p in all(ps)do
if p.n then
pset(p.x,p.y,8)
print('\#d' ..p.n[1],p.x+2,p.y+2,p.n[2]and 10or 0)end end end end
function _w()
print('\#7' .._m,1,122,0)end
for x=0,127do for y=0,127do
sset(x,y,pget(x,y))end end
function dt()
for x=0,127do
pset(x,x%2,d[pget(x,x%2)])
if(x>1)then
pset(x%2,x,d[pget(x%2,x)])
if(x<126)pset(x,127-x%2,d[pget(x,127-x%2)])
pset(127-x%2,x,d[pget(127-(x%2),x)])end end end
dt()
if(not m)_u()_w()
if(m)menuitem(1,'s: show name')menuitem(2,'d: hide all')menuitem(3,'f: show nations')
::_::
if m then
if(btn(⬅️,1))_w()
if(btn(➡️,1))_u()
if(btn(⬇️,1))cls(12)spr(0,0,0,16,16)dt()
end
goto _