private int startX(Point[][] matrix) {
        for (int row = 0; row < matrix.length; row++) {
            for (int col = 0; col < matrix[0].length; col++) {
                if (matrix[row][col] != null) {
                    return matrix[row][col].x - row;
                }
            }
        }
        throw new RuntimeException();
    }