@Override
	public String processCommand(String[] arguments)
			throws SystemCommandException {

		Election election = facade.getCurrentElection();

		if (election == null)
			throw new SystemCommandException("No current election set.");

		String guid = facade.getCurrentUserGUID();
		if (guid == null)
			throw new SystemCommandException("No current user set.");

		DnDElectionType t = ((DnDElection) election).getType();

		Vote v = null;

		String option = arguments[0];

		switch (t) {
		case REFERENDUM:
			v = new DnDYesNoVote(option);
			break;
		case SIMPLEPLURALITY:
			v = new DnDOneOfNVote(option);
			break;
		case ALTERNATE:
			v = new RankedVote(arguments);
		}

		try {
			facade.castVote(v);
		} catch (RuntimeException e) {
			throw new SystemCommandException(e.getMessage());
		}
		
		
		return "A vote was cast for [" + Arrays.toString(arguments) + "].";
	}