title: Hard time with factory method implementation in java
body: <p>So, I have a class that represents a game board (4x4), each space is the face value of a die, represented internally by an arraylist. I'm supposed to implement factory methods to generate the board.</p>
  
  <pre><code>public class Board {
      static ArrayList&lt;Die&gt; board = new ArrayList&lt;Die&gt;();
  
      public static Board makeFixedBoard(DiceManager dice) {
          for (int i = 0; i &lt; 16; i++) {
              //add faces
          }
          return new Board();
      } 
  }
  </code></pre>
  
  <p>However, I'm having a hard time understanding exactly how to implement the factory method. Here, my return is a new board, but that just creates a new empty board rather than the one I generated.</p>
  
  <p>This is the die class</p>
  
  <pre><code>public class Die {
  char[] faces = new char[6];
  char facevalue;
  
  public Die(char side1, char side2, char side3, char side4, char side5, char side6){
      faces[0] = side1;
      faces[1] = side2;
      faces[2] = side3;
      faces[3] = side4;
      faces[4] = side5;
      faces[5] = side6;
  
      facevalue = faces[0];
  }
  
  public void roll() {
      int roll = 0 + (int)(Math.random() * 6);
      facevalue = faces[roll];
  }
  
  public char getValue() {
      return facevalue;
  }
  </code></pre>