public void castVote(User user, Vote v) {
		if (type == DnDElectionType.ALTERNATE) {
			RankedVote rankedVote = (RankedVote) v;
			if (rankedVote.size() != candidateSet.size())
				throw new RuntimeException("Number of votes should be equal to the number of candidates");
		}
		if (usersVoted.contains(user))
			throw new RuntimeException("Illegal action! This user has already voted.");
		else if (getElectionState() != ElectionState.STARTED)
			throw new RuntimeException("Illegal action! The election is not in the STARTED state");
        else {
			usersVoted.add(user);
			votes.add(v);
		}
	}