public boolean isBlocked(Location loc1, Location loc2) {
		int r1 = loc1.row;
		int c1 = loc1.col;
		int r2 = loc2.row;
		int c2 = loc2.col;

		int dx = r2 - r1;
		int dy = c2 - c1;

		// trivial move?
		if ((dx == 0) && (dy == 0))
			return false;

		int mdx = Math.abs(dx);
		int mdy = Math.abs(dy);

		// cute test:
		if ((mdx * mdy != 0) && (mdx != mdy)) {
			// illegal move
			throw new IllegalArgumentException("Cannot move any piece from "
					+ r1 + ", " + c1 + " to " + r2 + ", " + c2
					+ " -- not horizontal or diagnoal");
		}

		// convert dx, dy to +-1
		dx = (dx == 0) ? 0 : dx / mdx;
		dy = (dy == 0) ? 0 : dy / mdy;
		int numSteps = Math.max(mdx, mdy);

		for (int i = 1; i < numSteps - 1; i++) {
			int x = r1 + i * dx;
			int y = c1 + i * dy;
			if (pieces[x][y] != null) {
				return true;
			}
		}
		return false;
	}