Beispiel #1
0
    def __init__(self, control=True):
        super().__init__()

        self.attributes('-topmost', True)
        self.bind(
            '<FocusIn>', lambda event:
            (self.attributes('-topmost', False), self.unbind('<FocusIn>')))
        self.title('Maze Solver')
        Maze.__init__(self)

        self.coordinate_plane = CoordinatePlane(self)
        self.controls = Controls(self)
        self.coordinate_plane.create_axes()
        self.create_origin()

        self.coordinate_plane.grid(row=0, column=0)
        tk.ttk.Separator(self, orient='vertical').grid(row=0,
                                                       column=1,
                                                       sticky='ns')
        self.controls.grid(row=0, column=2, padx=20, sticky='nsew')

        if not control:
            self.hide_controls()
 def __init__(self, polygons, width, height, granularity, start, end):
     Maze.__init__(self, polygons, width, height, granularity, start, end)
Beispiel #3
0
 def __init__(self, polygons, width, height, start, end):
     Maze.__init__(self, polygons, width, height, 1,
                   RRTPoint(start[0], start[1]), RRTPoint(end[0], end[1]))
     self.max_distance = 150
     self.min_distance = 50
     self.target_size = 15