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

Method add_wall

DemoPrograms/Demo_Graph_pymunk_Desktop_Balls.py:37–42  ·  view source on GitHub ↗
(self, pt_from, pt_to)

Source from the content-addressed store, hash-verified

35 self.arena_balls = [] # type: List[Ball]
36
37 def add_wall(self, pt_from, pt_to):
38 body = pymunk.Body(body_type=pymunk.Body.STATIC)
39 ground_shape = pymunk.Segment(body, pt_from, pt_to, 1.0)
40 ground_shape.friction = 0.8
41 ground_shape.elasticity = .99
42 self.space.add(ground_shape)
43
44 def add_balls(self, num_balls = 30):
45 for i in range(1, num_balls):

Callers 1

__init__Method · 0.95

Calls 1

addMethod · 0.45

Tested by

no test coverage detected