src/ie/gmit/sw/ai/Shuffler.java
private void swapRandomLetters() {
		int row1 = (int) Math.floor((Math.random() * 5));
		int row2 = (int) Math.floor((Math.random() * 5));
		int col1 = (int) Math.floor((Math.random() * 5));
		int col2 = (int) Math.floor((Math.random() * 5));
		
		//make sure the numbers are not the same
		if (row1 == row2 || col1 == col2){
			swapRandomLetters();
		}//if
		else {
			char temp = matrix[row1][col1];
			matrix[row1][col1] = matrix[row2][col2];
			matrix[row2][col2] = temp;
		}//else
	}
//pick numbers at random and change characters inside the matrix using those numbers
pick numbers at random and change characters inside the matrix using those numbers
pick numbers at random and change characters inside the matrix using those numbers
private void swapRandomLetters() {
		int row1 = (int) Math.floor((Math.random() * 5));
		int row2 = (int) Math.floor((Math.random() * 5));
		int col1 = (int) Math.floor((Math.random() * 5));
		int col2 = (int) Math.floor((Math.random() * 5));
		if (row1 == row2 || col1 == col2){
			swapRandomLetters();
		}
		else {
			char temp = matrix[row1][col1];
			matrix[row1][col1] = matrix[row2][col2];
			matrix[row2][col2] = temp;
		}
	}
private void swapRandomLetters ( ) { int row1 = ( int ) Math . floor ( ( Math . random ( ) * 5 ) ) ; int row2 = ( int ) Math . floor ( ( Math . random ( ) * 5 ) ) ; int col1 = ( int ) Math . floor ( ( Math . random ( ) * 5 ) ) ; int col2 = ( int ) Math . floor ( ( Math . random ( ) * 5 ) ) ; if ( row1 == row2 || col1 == col2 ) { swapRandomLetters ( ) ; } else { char temp = matrix [ row1 ] [ col1 ] ; matrix [ row1 ] [ col1 ] = matrix [ row2 ] [ col2 ] ; matrix [ row2 ] [ col2 ] = temp ; } }
pick numbers at random and change characters inside the matrix using those numbers
pick numbers at random and change characters inside the matrix using those numbers
//make sure the numbers are not the same //if //else