Re: The Euphoria Sub Commander project
- Posted by don cole <doncole at pacbel?.ne?> Nov 16, 2007
- 565 views
Could someone please explain the following code to me in detail? I'm especially confused by the {} brackets.
k=player --1 or 2 cen={{120,360},{520,360}}, -- centers of clock r=100, -- radius of clock rt=remaining time in secs Don Cole function p2xy(atom r, atom a) -- polar to xy return {-r*sin(a),-r*cos(a)} end function draw_line(colors[k],{cen[[k],cen[k]+p2xy(r,rt/1800*PI)})
This code comes from : Simple Chess Clock / Countdown Timer Author : Ernest Cheam In the Archives. Thank you,