private static boolean reachableFromSource(Vertex from,
			HashMap<Vertex, Vertex> predecessors) {
		
		HashSet<Vertex> visited = new HashSet<Vertex>();
		
		Vertex source = new Vertex(0, 0);
		Vertex aVertex = new Vertex(from.posX, from.posY);
		Vertex me;
		
		boolean exit = false;
		
		while(predecessors.get(aVertex) != null && !exit) {
			me = new Vertex(aVertex.posX, aVertex.posY);
			aVertex = predecessors.get(aVertex);
			
			if(aVertex.equals(source) || me.equals(aVertex)) {
				exit = true;
			}
			
			if(visited.contains(aVertex)) {
				exit = true;
			} else {
				visited.add(aVertex);
			}
			
		}
		
		return aVertex.equals(source);
	}