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

Method __init__

floodfill/floodfill.py:11–23  ·  view source on GitHub ↗
(self, window_width, window_height)

Source from the content-addressed store, hash-verified

9
10class FloodFill:
11 def __init__(self, window_width, window_height):
12 self.window_width = int(window_width)
13 self.window_height = int(window_height)
14
15 pygame.init()
16 pygame.display.set_caption("Floodfill")
17 self.display = pygame.display.set_mode((self.window_width, self.window_height))
18 self.surface = pygame.Surface(self.display.get_size())
19 self.surface.fill((0, 0, 0))
20
21 self.generateClosedPolygons() # for visualisation purposes
22
23 self.queue = []
24
25 def generateClosedPolygons(self):
26 if self.window_height < 128 or self.window_width < 128:

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected