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

Method add_wall

DemoPrograms/Demo_Graph_Ball_Game.py:48–54  ·  view source on GitHub ↗
(self, pt_from, pt_to)

Source from the content-addressed store, hash-verified

46 self.graph_elem = graph_elem # type: sg.Graph
47
48 def add_wall(self, pt_from, pt_to):
49 body = pymunk.Body(body_type=pymunk.Body.STATIC)
50 ground_shape = pymunk.Segment(body, pt_from, pt_to, 0.0)
51 ground_shape.friction = 0.8
52 ground_shape.elasticity = .99
53 ground_shape.mass = pymunk.inf
54 self.space.add(ground_shape)
55
56 def add_random_balls(self):
57 for i in range(1, 200):

Callers 2

__init__Method · 0.95

Calls 1

addMethod · 0.45

Tested by

no test coverage detected