(self, a, x, y)
Moves agent, a, to new position (x,y) unless difference in terrain levels between
        its current position and new position is greater than 4.
Moves agent, a, to new position (x,y) unless difference in terrain levels between
        its current position and new position is greater than 4.
Moves agent a to new position ( x y ) unless difference in terrain levels between its current position and new position is greater than 4 .
def move_agent(self, a, x, y):
        ''' Moves agent, a, to new position (x,y) unless difference in terrain levels between
        its current position and new position is greater than 4.'''
        if abs(self.terr.get(x, y)-self.terr.get(a.x, a.y)) <= 4:
            self.agent_map.set(a.x, a.y, None)
            self.agent_map.set(x, y, a)
            a.x = x
            a.y = y
def move_agent ( self , a , x , y ) : if abs ( self . terr . get ( x , y ) - self . terr . get ( a . x , a . y ) ) <= 4 : self . agent_map . set ( a . x , a . y , None ) self . agent_map . set ( x , y , a ) a . x = x a . y = y