programs/psychedelic.toby
author Ryan C. Gordon <icculus@icculus.org>
Tue, 18 Mar 2008 02:05:22 +0000
changeset 499 96e88f292dc8
parent 1 d7cb562e4e24
permissions -rw-r--r--
Updated Lua from 5.1.1 to 5.1.3.
number color

function main() returns nothing
    number i
	color = 0
	disableFence()
hideTurtle()
    for i = 1 to 360 step 2
        circle()
        turnRight(2)
    endfor
endfunction


function circle() returns nothing
    number i

    for i = 1 to 360
		color = color + 1
		if (color > 11)
			color = 0
		endif
		setPenColor(color)
        goForward(3)
        turnRight(1)
    endfor
endfunction