(self, pt_from, pt_to)
| 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 = [] |