joriszwart.nl

I code dreams™

blocks

Download
CYAN = "#0097A7"
PURPLE = "#7B1FA2"
ORANGE = "#F57C00"
YELLOW = "#FBC02D"
GREEN = "#388E3C"
BLUE = "#1976D2"
RED = "#D32F2F"

colors = [CYAN, BLUE, ORANGE, YELLOW, GREEN, PURPLE, RED]

CLEAR = "#F9F4F2"

I = [
    [(0, 1), (1, 1), (2, 1), (3, 1)],
    [(1, 0), (1, 1), (1, 2), (1, 3)],
    [(0, 1), (1, 1), (2, 1), (3, 1)],
    [(1, 0), (1, 1), (1, 2), (1, 3)],
]

J = [
    [(0, 1), (1, 1), (2, 1), (2, 2)],
    [(1, 0), (1, 1), (1, 2), (2, 0)],
    [(0, 1), (0, 2), (1, 2), (2, 2)],
    [(1, 2), (2, 0), (2, 1), (2, 2)],
]

L = [
    [(0, 1), (0, 2), (1, 1), (2, 1)],
    [(1, 0), (1, 1), (1, 2), (2, 2)],
    [(0, 2), (1, 2), (2, 1), (2, 2)],
    [(1, 0), (2, 0), (2, 1), (2, 2)],
]

O = [
    [(1, 1), (1, 2), (2, 1), (2, 2)],
    [(1, 1), (1, 2), (2, 1), (2, 2)],
    [(1, 1), (1, 2), (2, 1), (2, 2)],
    [(1, 1), (1, 2), (2, 1), (2, 2)],
]

S = [
    [(0, 2), (1, 1), (1, 2), (2, 1)],
    [(1, 0), (1, 1), (2, 1), (2, 2)],
    [(0, 2), (1, 1), (1, 2), (2, 1)],
    [(1, 0), (1, 1), (2, 1), (2, 2)],
]

T = [
    [(0, 1), (1, 1), (1, 2), (2, 1)],
    [(1, 0), (1, 1), (1, 2), (2, 1)],
    [(0, 2), (1, 1), (1, 2), (2, 2)],
    [(1, 1), (2, 0), (2, 1), (2, 2)],
]

Z = [
    [(0, 1), (1, 1), (1, 2), (2, 2)],
    [(1, 1), (1, 2), (2, 0), (2, 1)],
    [(0, 1), (1, 1), (1, 2), (2, 2)],
    [(1, 1), (1, 2), (2, 0), (2, 1)],
]

blocks = [I, J, L, O, S, T, Z]