Exemple #1
0
def splash(w, h):
    for n in range(0, w, 20):
        yield from rectangle(x=n, y=0, w=10, h=h, fill=True)

    yield from rectangle(x=0, y=17, w=w, h=30, fill=False)
    yield from text(x=0, y=20, string='PONG!', size=3)
    yield from text(x=80, y=20, string='Click to')
    yield from text(x=80, y=30, string='START!')
Exemple #2
0
def splash(w, h):
    for n in range(0, w, 20):
        yield from rectangle(x=n,
                             y=0,
                             w=10,
                             h=h,
                             fill=True)

    yield from rectangle(x=0,
                         y=17,
                         w=w,
                         h=30,
                         fill=False)
    yield from text(x=0, y=20, string='PONG!', size=3)
    yield from text(x=80, y=20, string='Click to')
    yield from text(x=80, y=30, string='START!')
Exemple #3
0
def ball(data):
    yield from rectangle(x=data['x'], y=data['y'],
                         w=BALL_W, h=BALL_H, fill=True)
Exemple #4
0
def paddle(data):
    yield from rectangle(x=data['x'], y=data['y'],
                         w=PADDLE_W, h=PADDLE_H,
                         fill=True)
Exemple #5
0
def brick(data):
    yield from rectangle(x=data['x'] + BRICK_BORDER,
                         y=data['y'] + BRICK_BORDER,
                         w=BRICK_W - BRICK_BORDER,
                         h=BRICK_H - BRICK_BORDER,
                         fill=True)
Exemple #6
0
def splash(w, h):
    for n in range(0, w, 20):
        yield from rectangle(x=n, y=0, w=10, h=h, fill=True)

    yield from rectangle(x=0, y=17, w=w, h=30, fill=False)
    yield from text(x=0, y=20, string='BREAKOUT', size=3)
Exemple #7
0
def ball(x, y):
    yield from rectangle(x=x, y=y, w=BALL_W, h=BALL_H, fill=True)
Exemple #8
0
def paddle(user):
    yield from rectangle(x=user['x'],
                         y=user['y'],
                         w=PADDLE_W,
                         h=PADDLE_H,
                         fill=True)
Exemple #9
0
def ball(x, y):
    yield from rectangle(x=x,
                         y=y,
                         w=BALL_W,
                         h=BALL_H,
                         fill=True)
Exemple #10
0
def paddle(user):
    yield from rectangle(x=user['x'],
                         y=user['y'],
                         w=PADDLE_W,
                         h=PADDLE_H,
                         fill=True)
Exemple #11
0
def ball(data):
    yield from rectangle(x=data['x'],
                         y=data['y'],
                         w=BALL_W,
                         h=BALL_H,
                         fill=True)
Exemple #12
0
def paddle(data):
    yield from rectangle(x=data['x'],
                         y=data['y'],
                         w=PADDLE_W,
                         h=PADDLE_H,
                         fill=True)
Exemple #13
0
def brick(data):
    yield from rectangle(x=data['x'] + BRICK_BORDER,
                         y=data['y'] + BRICK_BORDER,
                         w=BRICK_W - BRICK_BORDER,
                         h=BRICK_H - BRICK_BORDER,
                         fill=True)
Exemple #14
0
def splash(w, h):
    for n in range(0, w, 20):
        yield from rectangle(x=n, y=0, w=10, h=h, fill=True)

    yield from rectangle(x=0, y=17, w=w, h=30, fill=False)
    yield from text(x=0, y=20, string='BREAKOUT', size=3)