def move(agent, arena, loc):
    if (agent.moves <= 0):
        return (agent, arena)
    elif (abs(((loc[0] - agent.pos[0]) + (loc[1] - agent.pos[1]))) <= agent.move_range):
        arena.arena[(agent.pos[0], agent.pos[1])] = 0
        arena.arena[(loc[0], loc[1])] = 1
        agent.moves -= 1
        agent.pos = loc
        arena.time += 1
        return (agent, arena)
    else:
        return (agent, arena)
def move(agent, arena, loc):
    if (agent.moves <= 0):
        return (agent, arena)
    elif (abs(((loc[0] - agent.pos[0]) + (loc[1] - agent.pos[1]))) <= agent.move_range):
        arena.arena[(agent.pos[0], agent.pos[1])] = 0
        arena.arena[(loc[0], loc[1])] = 1
        agent.moves -= 1
        agent.pos = loc
        arena.time += 1
        return (agent, arena)
    else:
        return (agent, arena)