Testing.java
//This function makes sure all values are possible for the random function
This function makes sure all values are possible for the random function
This function makes sure all values are possible for the random function
public boolean NewRandomPossible(int range){
        List<Integer> list1=new ArrayList<Integer>();
        for (int x=0; x<range; x++){
            list1.add(x);
        }
        long value;
        do{
            value=main.NewRandom(range);
            if(list1.contains((int)value)==true) {
                for(int c=0; c<list1.size();c++){
                    if (list1.get(c)==value){
                        list1.remove(c);
                    }
                }
            }
        }while(list1.isEmpty()==false);
            return true;
    }
public boolean NewRandomPossible ( int range ) { List < Integer > list1 = new ArrayList < Integer > ( ) ; for ( int x = 0 ; x < range ; x ++ ) { list1 . add ( x ) ; } long value ; do { value = main . NewRandom ( range ) ; if ( list1 . contains ( ( int ) value ) == true ) { for ( int c = 0 ; c < list1 . size ( ) ; c ++ ) { if ( list1 . get ( c ) == value ) { list1 . remove ( c ) ; } } } } while ( list1 . isEmpty ( ) == false ) ; return true ; }
This function makes sure all values are possible for the random function
This function makes sure all values are possible for the random function
//fill a list full of all possible values //generate a random value //remove value from list //repeat until list is empty