def __init__(self): """Create a new game""" self.score = 0 self.high_score = 0 self.balls = [] self.bg, self.bg_rect = load_png('bin/background.png') self.reset()
def __init__(self, start_x, start_y, radius): self.posX = start_x self.posY = start_y self.velX = 0 self.velY = 0 self.radius = radius self.img = load_png("bin/ball.png")
def __init__(self, start_x, start_y, radius): """Creates a ball""" self.posX = start_x self.posY = start_y self.velX = 0 self.velY = 0 self.radius = radius self.img, self.img_rect = load_png("bin/ball.png")
def __init__(self): """Create a new game""" self.score = 0 self.ball = Ball(WIDTH // 2, BALL_SIZE, BALL_SIZE) self.bg, self.bg_rect = load_png('bin/background.png') self.reset()
def __init__(self, score=0): self.score = score self.ball = Ball(WIDTH / 2, HEIGHT / 2, BALL_SIZE) self.bg, self.bg_rect = load_png('bin/background.png') self.reset()