public char getRandomDirection(){
Random rand=new Random();
int random= rand.nextInt();
            for(int l=0; l < 1500 ; l++ ){
                        random = rand.nextInt(99);
            }
            if (random >= 0 && random <= 25) {
                        direction='r';
                        return direction;//right
            }
            if (random >= 26 && random <= 50){
                        direction='l';
                        return direction;//left
            }           
            if (random >= 51 && random <= 75){
                        direction='u';
                        return direction;//up
            }
           if (random >= 76 && random <= 100){
                      direction='d';
                       return direction;//downs
           }
 return 0;
}