示例#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
文件: pong.py 项目: nvbn/pyboard-play
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
文件: pong.py 项目: nvbn/pyboard-play
def ball(x, y):
    yield from rectangle(x=x,
                         y=y,
                         w=BALL_W,
                         h=BALL_H,
                         fill=True)
示例#10
0
文件: pong.py 项目: nvbn/pyboard-play
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)