public static void resolve(Tasks[] tasks, int currentTask, boolean[] used, int[] order, int orderPos) {
		for (int i = 0; i < tasks[currentTask].reqs.size(); ++i) {
			if (!used[tasks[currentTask].reqs.get(i)]) {
				resolve(tasks, i, used, order, orderPos);
				used[i] = true;
				order[orderPos] = tasks[currentTask].reqs.get(i);
				++orderPos;
			}
		}
	}