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

Method __init__

DemoPrograms/Demo_PyGame_Snake_Game.py:39–50  ·  view source on GitHub ↗
(self, x, y)

Source from the content-addressed store, hash-verified

37 # Constructor function
38
39 def __init__(self, x, y):
40 # Call the parent's constructor
41 super().__init__()
42
43 # Set height, width
44 self.image = pygame.Surface([segment_width, segment_height])
45 self.image.fill(WHITE)
46
47 # Make our top-left corner the passed-in location.
48 self.rect = self.image.get_rect()
49 self.rect.x = x
50 self.rect.y = y
51
52# --------------------------- GUI Setup & Create Window -------------------------------
53

Callers

nothing calls this directly

Calls 1

fillMethod · 0.45

Tested by

no test coverage detected