private void findIntentions(ArrayList<Desire> desires) {
		ArrayList<Desire> chosenIntentions = new ArrayList<Desire>();

		//Assign new intentions.
		for (Agent a : level.agents) {
			a.desire = null;
		}
		
		//Shuffle desires. Should be removed in later stages.
		Collections.shuffle(desires);
		
		for (Desire d : desires) {
			boolean agentAlreadyInIntentions = false;
			for (Desire desire : chosenIntentions) {
				if (desire.agent == d.agent || desire.box == d.box
						|| (desire.goal != null && desire.goal == d.goal)) {
					agentAlreadyInIntentions = true;
				}
			}
			if (!agentAlreadyInIntentions) {
				d.agent.desire = d;
				chosenIntentions.add(d);
			}
		}
	}