test_colors.update()   A
last analyzed

Complexity

Conditions 2

Size

Total Lines 9
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 9
nop 0
dl 0
loc 9
rs 9.95
c 0
b 0
f 0
1
from pypen import *
2
from pypen import _COLORS
3
4
def start():
5
    settings.fps = 120
6
7
8
colors = []
9
10
colors += _COLORS.values()
11
colors += _COLORS.keys()
12
13
14
def update():
15
    global colors
16
    clear()
17
    i = 0
18
    radius = 10
19
    for x, y in grid(radius*2):
20
        circle(x, y + cos(TIME*2 + x*0.1)*10, radius, colors[i])
21
        i += 1
22
        i %= len(colors)
23