MCPcopy Index your code
hub / github.com/PySimpleGUI/PySimpleGUI / add_balls

Method add_balls

DemoPrograms/Demo_Graph_pymunk_2D_Graphics.py:53–63  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

51 self.space.add(ground_shape)
52
53 def add_balls(self):
54 self.arena_balls = []
55 for i in range(1, 200):
56 x = random.randint(0, 600)
57 y = random.randint(0, 400)
58 r = random.randint(1, 10)
59 ball = Ball(x, y, r)
60 self.arena_balls.append(ball)
61 self.space.add(ball.body, ball.shape)
62 ball.gui_circle_figure = self.graph_elem.draw_circle(
63 (x, y), r, fill_color='black', line_width=0)
64
65
66def main():

Callers 1

mainFunction · 0.95

Calls 3

draw_circleMethod · 0.80
BallClass · 0.70
addMethod · 0.45

Tested by

no test coverage detected