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

Method __init__

DemoPrograms/Demo_Pong_Multiple_Platforms.py:111–118  ·  view source on GitHub ↗
(self, graph: sg.Graph, colour, x, width=BAT_SIZE[0], height=BAT_SIZE[1])

Source from the content-addressed store, hash-verified

109
110class PongBall():
111 def __init__(self, graph: sg.Graph, colour, x, width=BAT_SIZE[0], height=BAT_SIZE[1]):
112 self.graph = graph
113 self.id = graph.draw_rectangle(
114 (x - width / 2, 200), (x + width / 2, 200 + height), fill_color=colour)
115 self.y = 0
116 self.x = x
117 self.curx = x
118 self.cury = height/2
119
120 def up(self, amount):
121 self.y = -amount

Callers

nothing calls this directly

Calls 1

draw_rectangleMethod · 0.80

Tested by

no test coverage detected