private int listContains(List<int[]> info, int x, int y, int len) {
        for (int i = 0; i < info.size(); i++) {
            int[] row = info.get(i);
            if (row[0] == x && row[1] == y && row[2] == len) {
                return i;
            }
        }
        return -1;
    }