def reset(self, event=None): #t1 = time.time() if FigureControl.numVisibleGenNumber() != 0: while FigureControl.numVisibleGenNumber() != 0: genNumber = FigureControl.maxVisibleGenNumber() print("cleaning ...", genNumber) FigureControl.hideOffSprings(genNumber) FigureControl.clear_labels() self.home()
def next(self, event=None): ok, err = self.eligibleClick("next") if not ok: FigureControl.print_error(err) else: print("showing nextGen") nextGenNum = FigureControl.minPossibleGenNumber if FigureControl.numVisibleGenNumber() > 0: nextGenNum = min( FigureControl.maxVisibleGenNumber() + FigureControl.step, FigureControl.maxPossibleGenNumber) FigureControl.makeGenVisible(nextGenNum, True, "next")