public int[] randomTileArray(int maxNum)
 {
    
    int rg = 0; // Initialize random generated number
    String rs = null; //String to hold rg for comparison
    int rc = 0; // Initialize random count
    int rm = 2; // Declare and set random count max (1 pair = 2)
    boolean pass = false;
    int returnRandom = 0;
    boolean candidate = false;
    int[] tempArray1 = new int[maxNum];
    int[] tempArray2 = new int[maxNum];
    
    //Populate tempArray then return it to the calling method
    for (int a = 0; a <= maxNum; a++)
    {
        do
        {
            Random r = new Random();
            rg = r.nextInt(maxNum); // Generate new random number
            rs = String.valueOf(rg);
            
            for (int b = 0; b <= maxNum; b++ )
            {
                String bs = String.valueOf(tempArray1[b]);
                
                if (!bs.equals(rs))
                {
                    //tempArray1[b] = rg;
                   candidate = true;
                }
                else
                {
                    candidate = false;
                }
            }
            
            if (candidate){
                pass = true;
            }
      
        }
        while (pass = false);
        
        tempArray2[a] = rg;
        pass = false;

    }
    
    // Return populated array
    return tempArray2;

 }