public boolean addScore(long newScore, Player player){
    
        this.player = player;
        boolean success = false;
        long temp = 0;
        String stringTemp = "";
        String newName ;
        int i;
        String outMessage;
        
        if (newScore > 0){
            for (i= 0; i < 10 && success == false; i++){
                if (newScore > scoreArray[i]){
                    temp = scoreArray[i];
                    stringTemp = nameArray[i];
                    scoreArray[i] = newScore;
                    nameArray[i] = player.getName();
                    success = true;
                }
            } 
        if (success == true){
            do {
                newScore = temp;
                newName = stringTemp;
                temp = scoreArray[i];
                stringTemp = nameArray[i];
                scoreArray[i] = newScore;
                nameArray[i] = newName;
                i++;          
            } while(i<10);
        }
            
       }    
            return success;
    }