boolean testAndSet(Obstacle obs) {
		if (isDirty)
			return false;
		// This will never actually happen because obstacles are not stored by
		// identity
		if (excludedObstacles.contains(obs))
			return false;

		Segment seg1 = new Segment(obs.topLeft, obs.bottomRight);
		Segment seg2 = new Segment(obs.topRight, obs.bottomLeft);

		for (int s = 0; s < points.size() - 1; s++) {
			points.getPoint(CURRENT, s);
			points.getPoint(NEXT, s + 1);

			if (seg1.intersects(CURRENT, NEXT)
					|| seg2.intersects(CURRENT, NEXT) || obs.contains(CURRENT)
					|| obs.contains(NEXT)) {
				isDirty = true;
				return true;
			}
		}
		return false;
	}