src/ie/gmit/sw/ai/Shuffler.java
private void swapRandomCols() {
		int col1 = (int) Math.floor((Math.random() * 5));
		int col2 = (int) Math.floor((Math.random() * 5));
		
		if (col1 == col2){
			swapRandomCols();
		}//if
		else {
			for (int i = 0; i < 5; i++){
				char temp = matrix[i][col1];
				matrix[i][col1] = matrix[i][col2];
				matrix[i][col2] = temp;
			}//for
		}//else
	}
//randomly picks 2 columns and switches them around in the matrix
randomly picks 2 columns and switches them around in the matrix
randomly picks 2 columns and switches them around in the matrix
private void swapRandomCols() {
		int col1 = (int) Math.floor((Math.random() * 5));
		int col2 = (int) Math.floor((Math.random() * 5));
		if (col1 == col2){
			swapRandomCols();
		}
		else {
			for (int i = 0; i < 5; i++){
				char temp = matrix[i][col1];
				matrix[i][col1] = matrix[i][col2];
				matrix[i][col2] = temp;
			}
		}
	}
private void swapRandomCols ( ) { int col1 = ( int ) Math . floor ( ( Math . random ( ) * 5 ) ) ; int col2 = ( int ) Math . floor ( ( Math . random ( ) * 5 ) ) ; if ( col1 == col2 ) { swapRandomCols ( ) ; } else { for ( int i = 0 ; i < 5 ; i ++ ) { char temp = matrix [ i ] [ col1 ] ; matrix [ i ] [ col1 ] = matrix [ i ] [ col2 ] ; matrix [ i ] [ col2 ] = temp ; } } }
randomly picks 2 columns and switches them around in the matrix
randomly picks 2 columns and switches them around in the matrix
//if //for //else