(self, cube)
return True
Blocks the cube at each frame, if possible.

        Returns True if the cube cannot be blocked.
Blocks the cube at each frame, if possible.
Blocks the cube at each frame if possible .
def recursive_block(self, cube):
        """Blocks the cube at each frame, if possible.

        Returns True if the cube cannot be blocked.
        """
        for i in range(len(self.frames)-1, 0, -1):
            cubeprime = cube.substitute(dict([(v, next_var(v)) for v in self.system.variables]))
            cubepre = self.solve(And(self.frames[i-1], self.system.trans, Not(cube), cubeprime))
            if cubepre is None:
                for j in range(1, i+1):
                    self.frames[j] = And(self.frames[j], Not(cube))
                return False
            cube = cubepre
        return True
def recursive_block ( self , cube ) : for i in range ( len ( self . frames ) - 1 , 0 , - 1 ) : cubeprime = cube . substitute ( dict ( [ ( v , next_var ( v ) ) for v in self . system . variables ] ) ) cubepre = self . solve ( And ( self . frames [ i - 1 ] , self . system . trans , Not ( cube ) , cubeprime ) ) if cubepre is None : for j in range ( 1 , i + 1 ) : self . frames [ j ] = And ( self . frames [ j ] , Not ( cube ) ) return False cube = cubepre return True