public int calculatePrestige(String givenname, boolean isSuccess) {
        ArrayList<String> listunique = new ArrayList<String>();
        for (int i = 0; i < achievedlist.size(); i++) {
            boolean isthere = false;
            for (int j = 0; j < listunique.size(); j++) {
                if (achievedlist.get(i).equals(listunique.get(j))) {
                    isthere = true;
                }
            }
            if (!isthere) {
                listunique.add(achievedlist.get(i));
            }
        }

        int reward;
        if (isSuccess) {
            if (listunique.isEmpty()) {
                reward = Integer.parseInt(reward_first);
            } else if (!listunique.get(0).equals(givenname)) {
                reward = Integer.parseInt(reward_second);
            } else {
                reward = (int) (Integer.parseInt(reward_first)/(Math.pow(2,achievedlist.size())));
            }
            achievedlist.add(givenname); //Do not forget to add success mission to list of achievements
        }
        else{
            reward=Integer.parseInt(reward_fail);
        }

        for (Player tempPlayer:Players.players){
            if (tempPlayer.getName().equals(givenname)){
                System.out.println("Calculate Prestige, player current prestige "+tempPlayer.getName()+" "+tempPlayer.getPrestige());
                tempPlayer.addPrestige(reward);
                System.out.println("Calculate Prestige, add player "+tempPlayer.getName()+" prestige "+String.valueOf(reward));
                System.out.println("Calculate Prestige, player current prestige "+tempPlayer.getName()+" "+tempPlayer.getPrestige());
            }
        }
        return reward;
    }