private void AreaDFS(AreaNode n)
	{
		ArrayList<Goal> neighborGoals = new ArrayList<Goal>();
		
		// BFS adding all fields to AreaNode
		Queue<Field> queue = new LinkedList<Field>();
		queue.add(n.fields.get(0));
		while (queue.size() > 0) {
			Field t = queue.poll();
			for (Field field : t.neighbors) {
				if (field==null) continue;
				if (field instanceof Goal) {     // goals we explore later
					neighborGoals.add((Goal)field);
				} else if (field.node == null) { // add all unexplored neighbors to queue
					queue.add(field);
					fields.add(field);
					field.td = this;
					n.addField(field);
				}
			}
		}
		
		// Explore found goals
		for (Goal g : neighborGoals) {
			if (g.node == null) {
				// we haven't seen this goal before so we call DFS on it
				goals.add(g); g.td = this;
				GoalNode m = new GoalNode(g); graph.add(m);
				GoalDFS(m);
			} else {
				// already explored so we just link nodes
				g.node.neighbors.add(n);
				n.neighbors.add(g.node);
			}
		}
	}