public static void dfs(int r1, int c1, int r2, int c2, int d) {

		Queue<Point> cola = new LinkedList<Point>();
		Queue<Integer> cola2 = new LinkedList<Integer>();
		cola.add(new Point(r1, c1));
		cola2.add(1);
		boolean arr[][] = new boolean[8][8];
		arr[r1][c1] = true;
		res=1;
		p:while (!cola.isEmpty()) {
			Point actual = cola.poll();
			int proff = cola2.poll();
			if(proff>2){
				res=100;
				break p;
			}
			for (int i = 0; i < dX.length; i++) {
				int x = actual.x + dX[i];
				int y = actual.y + dY[i];
				if (validate(x, y, r2, c2)) {
					res = proff + 1;
					break p;
				} else if (x >= 0 && x < 8 && y >= 0 && y < 8 && !arr[x][y]) {
					cola.add(new Point(x, y));
					cola2.add(proff + 1);
					arr[x][y] = true;
				}
			}
		}

	}