Exemplo n.º 1
0
        if player.x > 0:
            player.x -= player.speed
    elif keys_down["right"]:
        if player.x < 1270:
            player.x += player.speed

    #print defense.x, defense.y

    # distance_between = fabs(player.x - ball.x) + fabs(player.y - ball.y)
    # if distance_between < 32:
    # 	print "Collision"
    # else:
    # 	print "Not touching"

    screen.blit(background_image, [0, 0])
    fan.draw_me()

    for player in players:
        #update the bad guy based on where the player is
        player.update()
        player.draw_me()

    player.draw_me()

    for cup in cups:
        cup.draw_me()
        cup.update()

    for ball in balls:
        #ball.update()
        ball.draw_me()