I'll finish this on another computer in a bit (maybe never)
deflng a-z
const sw = 1000
const sh = 700
dim shared pi as double
pi = 4*atn(1)
dim shared mx, my, mbl, mbr, mw
dim shared aa(19)
aa( 0) = 6
aa( 1) = 10
aa( 2) = 15
aa( 3) = 2
aa( 4) = 17
aa( 5) = 3
aa( 6) = 19
aa( 7) = 7
aa( 8) = 16
aa( 9) = 8
aa(10) = 11
aa(11) = 14
aa(12) = 9
aa(13) = 12
aa(14) = 5
aa(15) = 20
aa(16) = 1
aa(17) = 18
aa(18) = 4
aa(19) = 13
'draw board once
screen _newimage(sw, sh, 32),, 1, 0
for y=-0.800*sh/2 to 0.800*sh/2
for x=-0.800*sh/2 to 0.800*sh/2
dim a as double
a = _atan2(y, x) + pi
r = sqr(x*x + y*y)
if r <= (0.800*sh/2) then
am2 = (a*20/(2*pi)) mod 2
if r >= 0.765*sh/2 or r >= 0.465*sh/2 and r <= 0.500*sh/2 then
if am2 = 0 then
c = _rgb(0,180,0)
else
c = _rgb(210,0,0)
end if
else
if am2 = 0 then
c = _rgb(230,230,200)
else
c = _rgb(0,0,0)
end if
end if
if r<=0.060*sh/2 then
if r<=0.025*sh/2 then
c = _rgb(210,0,0)
else
c = _rgb(0,180,0)
end if
end if
pset (sw/2 + x, sh/2 + y), c
end if
next
next
circle (sw/2, sh/2), sh/2 - 1, _rgb(50, 50, 50)
circle step(0,0), 0.800*sh/2
circle step(0,0), 0.765*sh/2
circle step(0,0), 0.500*sh/2
circle step(0,0), 0.465*sh/2
circle step(0,0), 0.060*sh/2
circle step(0,0), 0.025*sh/2
for i=0 to 19
dim x as double, y as double
x = cos(2*pi*(i/20) + 2*pi/40)
y = sin(2*pi*(i/20) + 2*pi/40)
pset (sw/2 + (0.060*sh/2)*x, sh/2 + (0.060*sh/2)*y)
line -(sw/2 + (0.800*sh/2)*x, sh/2 + (0.800*sh/2)*y)
x = cos(2*pi*(i/20))
y = sin(2*pi*(i/20))
_printstring (sw/2 + (0.900*sh/2)*x - (8*len(ltrim$(str$(aa(i))))/2) - 8, sh/2 + (0.900*sh/2)*y - 8), str$(aa(i))
next
for i=0 to sh
line (0, i)-step((sw - sh)/2 - 0.05*i*1000/sh, 0), _rgb(50 + 50*2*(atn(0.01*(sh/2 - i)))/pi,50 + 50*2*(atn(0.01*(i - sh/2)))/pi,0)
next
'main screen
screen ,, 0, 0
do
t = timer*1000
getmouse
pcopy 1,0
locate 1,1
'? mx, my, mbl, mbr, mw
? t
'for i=0 to 500+500*sin(2*pi*0.5*(t mod 10000)/1000)
i = 500+500*sin(2*pi*0.5*(t mod 10000)/1000)
line (0, i*sh/1000)-step((sw - sh)/2 - i*0.05, 0)
'next
_display
'_limit 100
loop until _keyhit=27
sleep
system
sub getmouse()
do
mx = _mousex
my = _mousey
mbl = _mousebutton(1)
mbr = _mousebutton(2)
mw = mw - _mousewheel
loop while _mouseinput
end sub
sub circlef (x, y, r, c as long)
x0 = r
y0 = 0
e = 0
do while y0<x0
line(x-x0,y+y0)-(x+x0,y+y0),c,bf
line(x-x0,y-y0)-(x+x0,y-y0),c,bf
line(x-y0,y-x0)-(x+y0,y-x0),c,bf
line(x-y0,y+x0)-(x+y0,y+x0),c,bf
if e<=0 then
y0=y0+1
e=e+2*y0
else
x0=x0-1
e=e-2*x0
end if
loop
end sub