example_003.draw_pattern()   A
last analyzed

Complexity

Conditions 3

Size

Total Lines 4
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 3
eloc 4
nop 0
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
from pypen import *
2
3
4
def start():
5
    settings.fps = 5
6
7
8
def update():
9
    fill_screen("#E33050")
10
    draw_pattern()
11
12
13
def draw_pattern():
14
    for x, y in grid(spacing=10):
15
        if random() > 0.5:
16
            rectangle(x, y, 8, 8, "#F34060")
17