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