title: Permutations of int arrays that sum to 16
body: <p>I have a method that will return a double based on the value. Each int in the array will be between 1 through 6, signifying consecutive dice rolls.</p>
  
  <p>The array could be 16 slots large or as small as 4, and the order matters. I am at a loss as to how I can code in java to look at every permutation that totals to at least 16. Looking online yielded no aid.</p>
  
  <p>My pitiful code for this is below</p>
  
  <pre><code>public double findMax() {
      int[] dice = new int[gameBoard.length];
      for(int x : dice) x = 1;
      double max = playGame(dice);
      /* 
      int pos = 0;
      for(int i = 0; i &lt; dice.length; i++) {
          double test = playGame(dice);
          if(test &gt; max) test = max;
      */
  
      //This is where I need help, to use the int[] dice for all combinations
      //playGame(dice) yields a double
  }
  </code></pre>