programs/psychedelic2.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.
icculus@1
     1
function main() returns nothing
icculus@1
     2
    number i
icculus@1
     3
	number color
icculus@1
     4
	color = 0
icculus@1
     5
icculus@1
     6
	disableFence()
icculus@1
     7
    hideTurtle()
icculus@1
     8
icculus@1
     9
    for i = 1 to 360 step 2
icculus@1
    10
		setPenColor(color)
icculus@1
    11
        circle()
icculus@1
    12
        turnRight(2)
icculus@1
    13
		color = color + 1
icculus@1
    14
		if (color > 15)
icculus@1
    15
			color = 0
icculus@1
    16
		endif
icculus@1
    17
    endfor
icculus@1
    18
endfunction
icculus@1
    19
icculus@1
    20
icculus@1
    21
function circle() returns nothing
icculus@1
    22
    number i
icculus@1
    23
icculus@1
    24
    for i = 1 to 360
icculus@1
    25
        goForward(3)
icculus@1
    26
        turnRight(1)
icculus@1
    27
    endfor
icculus@1
    28
endfunction
icculus@1
    29
icculus@1
    30
icculus@1
    31
icculus@1
    32
icculus@1
    33