

def main1():
    space = pm.Space()
    space.gravity = (0.0, (- 900.0))
    balls = []
    ticks_to_next_ball = 10
    sum_of_stuff = 0
    for x in range(5000):
        ticks_to_next_ball -= 1
        if (ticks_to_next_ball <= 0):
            ticks_to_next_ball = 10000
            mass = 10
            radius = 25
            inertia = pm.moment_for_circle(mass, 0, radius, (0, 0))
            body = pm.Body(mass, inertia)
            x = random.randint(115, 350)
            body.position = (x, 400)
            shape = pm.Circle(body, radius, Vec2d(0, 0))
            space.add(body, shape)
            balls.append(shape)
        balls_to_remove = []
        for ball in balls:
            if (ball.body.position.y < 0):
                balls_to_remove.append(ball)
            sum_of_stuff += ball.body.position.x
            sum_of_stuff += ball.body.angle
        for ball in balls_to_remove:
            space.remove(ball, ball.body)
            balls.remove(ball)
        if (len(balls) >= 1):
            v = balls[0].body.position
            print(('(in on_draw): point = %.2f, %.2f' % (v.x, v.y)))
        for x in range(1):
            space.step((1 / 50.0))
    return sum_of_stuff

dataset/ETHPy150Open estevaofon/angry-birds-python/pymunk-4.0.0/examples/basic_test.py main1/original