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

Method add_wall

DemoPrograms/Demo_Graph_pymunk_2D_Graphics.py:46–51  ·  view source on GitHub ↗
(self, pt_from, pt_to)

Source from the content-addressed store, hash-verified

44 self.add_wall((600, 0), (600, 400)) # right side
45
46 def add_wall(self, pt_from, pt_to):
47 body = pymunk.Body(body_type=pymunk.Body.STATIC)
48 ground_shape = pymunk.Segment(body, pt_from, pt_to, 0.0)
49 ground_shape.friction = 0.8
50 ground_shape.elasticity = .99
51 self.space.add(ground_shape)
52
53 def add_balls(self):
54 self.arena_balls = []

Callers 1

__init__Method · 0.95

Calls 1

addMethod · 0.45

Tested by

no test coverage detected