Esempio n. 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!')
Esempio n. 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!')
Esempio n. 3
0
def ball(data):
    yield from rectangle(x=data['x'], y=data['y'],
                         w=BALL_W, h=BALL_H, fill=True)
Esempio n. 4
0
def paddle(data):
    yield from rectangle(x=data['x'], y=data['y'],
                         w=PADDLE_W, h=PADDLE_H,
                         fill=True)
Esempio n. 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)
Esempio n. 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)
Esempio n. 7
0
def ball(x, y):
    yield from rectangle(x=x, y=y, w=BALL_W, h=BALL_H, fill=True)
Esempio n. 8
0
def paddle(user):
    yield from rectangle(x=user['x'],
                         y=user['y'],
                         w=PADDLE_W,
                         h=PADDLE_H,
                         fill=True)
Esempio n. 9
0
def ball(x, y):
    yield from rectangle(x=x,
                         y=y,
                         w=BALL_W,
                         h=BALL_H,
                         fill=True)
Esempio n. 10
0
def paddle(user):
    yield from rectangle(x=user['x'],
                         y=user['y'],
                         w=PADDLE_W,
                         h=PADDLE_H,
                         fill=True)
Esempio n. 11
0
def ball(data):
    yield from rectangle(x=data['x'],
                         y=data['y'],
                         w=BALL_W,
                         h=BALL_H,
                         fill=True)
Esempio n. 12
0
def paddle(data):
    yield from rectangle(x=data['x'],
                         y=data['y'],
                         w=PADDLE_W,
                         h=PADDLE_H,
                         fill=True)
Esempio n. 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)
Esempio n. 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)