private void buildMap() {
		nodes = new Node[xs.size()][ys.size()];

		Cord.maxI = xs.size() - 1;
		Cord.maxJ = ys.size() - 1;

		int i = 0, j = 0;
		for (int x : xs) {
			j = 0;
			for (int y : ys) {
				Point p = new Point(x, y);
				if (!(cpFrom.contains(p) || cpTo.contains(p))) {
					Node nd = new Node(p);
					nd.setIj(new Cord(i, j));
					nodes[i][j] = nd;
					if (nd.getP().equals(from.getDirectP()))
						ndFrom = nd;
					else if (nd.getP().equals(to.getDirectP()))
						ndTo = nd;
				}
				j++;
			}
			i++;
		}
	}