private Weapon count(int[] occurrences) {
        int result = 0;
        for (int i = 1; i < occurrences.length; i++) {
            if (occurrences[i] > occurrences[result]) {
                result = i;
            }
        }
        if (result == 0) {
            return Weapon.PAPER;
        } else if (result == 1) {
            return Weapon.SCISSORS;
        } else {
            return Weapon.ROCK;
        }

    }