def place_targets(n, arena, targets, pos=None):
    if (pos is not None):
        orig_pos = pos
        for i in range(n):
            targets[(i + 1)] = AAgent(pos[i])
            arena.arena[(pos[i][0], pos[i][1])] = 2
    else:
        orig_pos = []
        for i in range(n):
            while True:
                x = np.rint(np.array([((arena.size - 1) * np.random.rand(1)), ((arena.size - 1) * np.random.rand(1))]))
                if ((x[0] > 7) or (x[1] > 7)):
                    break
            x = [int(i) for i in x]
            targets[(i + 1)] = AAgent(x)
            arena.arena[(x[0], x[1])] = 2
            orig_pos.append([x[0], x[1]])
    return (arena, targets, orig_pos)
def place_targets(n, arena, targets, pos=None):
    if (pos is not None):
        orig_pos = pos
        for i in range(n):
            targets[(i + 1)] = AAgent(pos[i])
            arena.arena[(pos[i][0], pos[i][1])] = 2
    else:
        orig_pos = []
        for i in range(n):
            while True:
                x = np.rint(np.array([((arena.size - 1) * np.random.rand(1)), ((arena.size - 1) * np.random.rand(1))]))
                if ((x[0] > 7) or (x[1] > 7)):
                    break
            x = [int(i) for i in x]
            targets[(i + 1)] = AAgent(x)
            arena.arena[(x[0], x[1])] = 2
            orig_pos.append([x[0], x[1]])
    return (arena, targets, orig_pos)