Hey people i have this structure for the search tree
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];
    }
this is the root node definition
 State rootNode = new State(currentGrid);
 rootNode.value=-1;
 int v =maxValue(rootNode,depth);
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 :(
//i am trying to implement MiniMax Algorithm.
 
     
     
     
    