function removeOverflow(square){

	if(ifxo = 1){
	//Checks all rows for numbers that should be taken off since there can only be 3 at a time of each
	//x and y on the board. 	
	if(countX <= 9){

		if(square.charAt(1) == removeCount){
		for(let i = 1;i <= 9;i++){	
			if (getBox(i).charAt(1) == testcount) {
				
				clearBox(i);
			}else{
				console.log("test");
			}
		}
			testcount++;
			removeCount++;
		}else{
		//nothing
		}
	
	}else{

		if(square.substring(1) == removeCount){
		for(let i = 1;i <= 9;i++){	
			if (getBox(i).charAt(1) == testcount) {
				
				clearBox(i);
			}else{
				console.log(removeCount);
			}
		}
			testcount++;
			removeCount++;
			console.log(testcount);
		
		}else{
			//nothing
			console.log("TESTING");
		}
	}
	
	
	}else{

	//Checks all rows for numbers that should be taken off since there can only be 3 at a time of each
	//x and y on the board. 	
	if(countO <= 9){

		if(square.charAt(1) == removeCount){
		for(let i = 1;i <= 9;i++){	
			if (getBox(i).charAt(1) == testcount) {
				
				clearBox(i);
			}else{
				console.log("test");
			}
		}
			testcount++;
			removeCount++;
		}else{
		//nothing
		}
	
	}else{

		if(square.substring(1) == removeCount){
		for(let i = 1;i <= 9;i++){	
			if (getBox(i).charAt(1) == testcount) {
				
				clearBox(i);
			}else{
				console.log(removeCount);
			}
		}
			testcount++;
			removeCount++;
			console.log(testcount);
		
		}else{
			//nothing
			console.log("TESTING");
		}
	}

}





}
//This function removes any x->n or o->n value so that there are ever only 3 values for both x and y
This function removes any x->n or o->n value so that there are ever only 3 values for both x and y
This function removes any x - > n or o - > n value so that there are ever only 3 values for both x and y
function removeOverflow(square){
	if(ifxo = 1){
	if(countX <= 9){
		if(square.charAt(1) == removeCount){
		for(let i = 1;i <= 9;i++){	
			if (getBox(i).charAt(1) == testcount) {
				clearBox(i);
			}else{
				console.log("test");
			}
		}
			testcount++;
			removeCount++;
		}else{
		}
	}else{
		if(square.substring(1) == removeCount){
		for(let i = 1;i <= 9;i++){	
			if (getBox(i).charAt(1) == testcount) {
				clearBox(i);
			}else{
				console.log(removeCount);
			}
		}
			testcount++;
			removeCount++;
			console.log(testcount);
		}else{
			console.log("TESTING");
		}
	}
	}else{
	if(countO <= 9){
		if(square.charAt(1) == removeCount){
		for(let i = 1;i <= 9;i++){	
			if (getBox(i).charAt(1) == testcount) {
				clearBox(i);
			}else{
				console.log("test");
			}
		}
			testcount++;
			removeCount++;
		}else{
		}
	}else{
		if(square.substring(1) == removeCount){
		for(let i = 1;i <= 9;i++){	
			if (getBox(i).charAt(1) == testcount) {
				clearBox(i);
			}else{
				console.log(removeCount);
			}
		}
			testcount++;
			removeCount++;
			console.log(testcount);
		}else{
			console.log("TESTING");
		}
	}
}
}
function removeOverflow ( square ) { if ( ifxo = 1 ) { if ( countX <= 9 ) { if ( square . charAt ( 1 ) == removeCount ) { for ( let i = 1 ; i <= 9 ; i ++ ) { if ( getBox ( i ) . charAt ( 1 ) == testcount ) { clearBox ( i ) ; } else { console . log ( "test" ) ; } } testcount ++ ; removeCount ++ ; } else { } } else { if ( square . substring ( 1 ) == removeCount ) { for ( let i = 1 ; i <= 9 ; i ++ ) { if ( getBox ( i ) . charAt ( 1 ) == testcount ) { clearBox ( i ) ; } else { console . log ( removeCount ) ; } } testcount ++ ; removeCount ++ ; console . log ( testcount ) ; } else { console . log ( "TESTING" ) ; } } } else { if ( countO <= 9 ) { if ( square . charAt ( 1 ) == removeCount ) { for ( let i = 1 ; i <= 9 ; i ++ ) { if ( getBox ( i ) . charAt ( 1 ) == testcount ) { clearBox ( i ) ; } else { console . log ( "test" ) ; } } testcount ++ ; removeCount ++ ; } else { } } else { if ( square . substring ( 1 ) == removeCount ) { for ( let i = 1 ; i <= 9 ; i ++ ) { if ( getBox ( i ) . charAt ( 1 ) == testcount ) { clearBox ( i ) ; } else { console . log ( removeCount ) ; } } testcount ++ ; removeCount ++ ; console . log ( testcount ) ; } else { console . log ( "TESTING" ) ; } } } }
This function removes any x->n or o->n value so that there are ever only 3 values for both x and y
This function removes any x - > n or o - > n value so that there are ever only 3 values for both x and y
//Checks all rows for numbers that should be taken off since there can only be 3 at a time of each //x and y on the board. 	 //nothing //nothing //Checks all rows for numbers that should be taken off since there can only be 3 at a time of each //x and y on the board. 	 //nothing //nothing