def timer(self):
        needsRedraw = self.move() or (not self.status == self.PAUSED)

        if self.rotating:
            self.rotationCount -= 1
            if 0 <= self.rotationCount:
                self.rotating = False
                self.rotatingValues = [ ]
                self.state.rotate(self.rotationItem)
                del self.rotationItem
            needsRedraw = True

        if self.timeUntilNextRotation > 0:
            self.timeUntilNextRotation -= 1

        if (not self.rotating) and (self.timeUntilNextRotation <= 0):
            if (self.status == self.PLAYING) or (self.status == self.STEP):
                if self.moveIndex >= (len(self.moveList) - 1):
                    self.status = self.PAUSED
                    self.updateMessage('')
                    self.shuffling = False
                else:
                    self.moveIndex += 1
                    needsRedraw = self.makeMove(self.moveList[self.moveIndex],
                        animate = not self.shuffling, 
                        render = not self.shuffling or (self.moveIndex % 20 == 0))

            if (self.status == self.REVERSING) or (self.status == self.BACK):
                if self.moveIndex < 0:
                    self.status = self.PAUSED
                else:
                    needsRedraw = self.makeMove(reversal(self.moveList[self.moveIndex]))
                    self.moveIndex -= 1

            if (self.status == self.STEP) or (self.status == self.BACK):
                self.status = self.PAUSED
            self.timeUntilNextRotation = self.timeBetweenRotations


        if needsRedraw:
            try:
                self.redraw()
            except:
                self.updateMessage('Could not read cube.')
                self.state.setSolved()
                self.redraw()
dataset/ETHPy150Open bluquar/cubr/cube.py/Cube.timer/swapped operands of `<=`