public Tree(int depth, COLOR myColor, Board mainBoard){
		this.root = new Board(mainBoard);
		/*
		if (root==null)
			System.out.println("root is null");
		else System.out.println("root is not null");
		*/
		//this.root.computeUtility();
		ArrayList<Board> parentList = new ArrayList<Board>(); 
		parentList.add(this.root);
		
		while(depth > 0){
			
			ArrayList<Board> childrenList=new ArrayList<Board>();
			//System.out.println("MYCLOOROR:" + myColor);
			
			for(int k = 0; k < parentList.size(); k ++){	// for each parent
				Board curr = parentList.get(k);
				for(int i = 0;i< curr.board.size(); i ++)	// for each white cell on this parent
				{					
					for(int j = 0; j < curr.board.size(); j++)
					{
						Cell c = curr.board.get(i).get(j);
						
						if(c.color == COLOR.WHITE)
						{							
							Board child = new Board(curr);//deep copy parent
							child.setBoard(myColor, i, j);
							//child.computeUtility();
							curr.children.add(child);
							child.parent = curr;
							childrenList.add(child);	
						}
					}					
				}

			}
			parentList=childrenList;
			depth--;
			if (myColor==COLOR.BLUE)
				myColor=COLOR.GREEN;
			else myColor=COLOR.BLUE;
		}
		
		
	}