robot_localisation/robot.py
def surrounding(pos):
        """
        Return a random adjacent position to 'pos'.
        """
        x, y = pos
        choices = [(x-1, y-1), (x-1, y), (x-1, y+1), (x, y-1), (x, y+1),
                   (x+1, y-1), (x+1, y), (x+1, y+1)]
        return choices[np.random.randint(len(choices))]

        Return a random adjacent position to 'pos'.
        
Return a random adjacent position to 'pos'.
Return a random adjacent position to ' pos ' .
def surrounding(pos):
        x, y = pos
        choices = [(x-1, y-1), (x-1, y), (x-1, y+1), (x, y-1), (x, y+1),
                   (x+1, y-1), (x+1, y), (x+1, y+1)]
        return choices[np.random.randint(len(choices))]
def surrounding ( pos ) : x , y = pos choices = [ ( x - 1 , y - 1 ) , ( x - 1 , y ) , ( x - 1 , y + 1 ) , ( x , y - 1 ) , ( x , y + 1 ) , ( x + 1 , y - 1 ) , ( x + 1 , y ) , ( x + 1 , y + 1 ) ] return choices [ np . random . randint ( len ( choices ) ) ]
Return a random adjacent position to 'pos'.
Return a random adjacent position to ' pos ' .
"""
        Return a random adjacent position to 'pos'.
        """
pos