Logo Search packages:      
Sourcecode: uligo version File versions  Download package

def uligo::App::tryVariation (   self  ) 

Switch between normal and 'try variation' mode. 

Definition at line 1078 of file uligo.py.

01078                           :
        """ Switch between normal and 'try variation' mode. """
        
        if self.tryVarVar.get():                      # enter 'try variation' mode
            self.clock.stop()
            self.creditAvailable=0
            self.showSolutionButton.config(state=DISABLED)
            self.noTryVarMoves = 0
            self.board.state('normal', self.playVar)
            self.undoButton.config(state=NORMAL, command=self.undoTryVar)
            self.board.delMarks()
        else:                                         # exit 'try variation' mode
            if self.cursor.atEnd: self.board.state('disabled')
            else:           
                self.board.state('normal', self.nextMove)
            if self.cursor.wrongVariation or not self.cursor.atEnd:
                self.showSolutionButton.config(state=NORMAL)
            self.board.undo(self.noTryVarMoves)
            self.undoButton.config(command=self.undo2)
            if self.showSolVar.get():
                if self.options.animateSolVar.get():
                    self.undoButton.config(state=DISABLED)
                else:
                    self.undoButton.config(command=self.undoNavSol)
                    self.board.state('normal', self.navSolutionNextMove)
                    if self.inputColor == self.board.currentColor: self.markRightWrong()
                    else:                                          self.markAll()
                self.showSolutionButton.config(state=NORMAL)
        

    def clearStatistics(self):


Generated by  Doxygen 1.6.0   Back to index