MCPcopy Create free account
hub / github.com/geekcomputers/Python / __init__

Method __init__

PongPong_Game/pongpong.py:21–33  ·  view source on GitHub ↗
(self, *args, **kwargs)

Source from the content-addressed store, hash-verified

19
20class PongPongWindow(pyglet.window.Window):
21 def __init__(self, *args, **kwargs):
22 super(PongPongWindow, self).__init__(*args, **kwargs)
23
24 self.win_size = (WIDTH, HEIGHT)
25 self.paddle_pos = (WIDTH / 2 - PWIDTH / 2, 0)
26 self.main_batch = pyglet.graphics.Batch()
27 self.walls = load.load_rectangles(self.win_size, BORDER, batch=self.main_batch)
28 self.balls = load.load_balls(
29 self.win_size, RADIUS, speed=ballspeed, batch=self.main_batch
30 )
31 self.paddles = load.load_paddles(
32 self.paddle_pos, PWIDTH, PHEIGHT, acc=paddleacc, batch=self.main_batch
33 )
34
35 def on_draw(self):
36 self.clear()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected