def boundaryCheck(self):
        """ Check boundaries of start and end points """

        exits1 = self.getExitPoints(self._start)
        exits2 = self.getExitPoints(self._end)        

        if len(exits1)==0 or len(exits2)==0:
            return False

        return True
 Check boundaries of start and end points 
recipes/Python/496884_Amaze__objectoriented_maze_generatorsolver/recipe-496884.py