title: Passing by reference ruining everything :(
body: <p>Hey people i have this structure for the search tree</p>
  
  <pre><code>class State
  {
      //CLASS STATE
      int value;
      char[][] state; //the game Grid 
      State child[]; // children of current state, maximum is 8
      State(char[][] src)
      {
          state=src;
          child=new State[8];
      }
  </code></pre>
  
  <p>this is the root node definition</p>
  
  <pre><code> State rootNode = new State(currentGrid);
   rootNode.value=-1;
   int v =maxValue(rootNode,depth);
  </code></pre>
  
  <p>after the end of recursion in the max value function the array in rootNode should not be edited since its the  the first state but when i Display it i get an array filled with stuff which means that the rootNode.state passed by reference to the max value function :( </p>
  
  <p>//i am trying to implement MiniMax Algorithm. </p>