public ArrayList<City> getNeighbours(City city) {
        int index = getIndex(city);
        if (index < 0) {
            return null;
        }
        ArrayList<City> list = new ArrayList<>();
        for (int i = 0; i < edges.length; i++) {
            for (int x = 0; x < edges[i].length; i++) {
                if (edges[i][x] != 0) {
                    if (i == index) {
                        list.add(cities[x]);
                    } else if (x == index) {
                        list.add(cities[i]);
                    }
                }
            }
        }
        return list;
    }