sclass RandomScreenScan { int w, h; transient Rect lastSent; transient int stayMax; *() {} *(int *w, int *h) {} Rect get(bool foundSomething) { if (foundSomething && lastSent != null && stayMax++ < 10) ret lastSent; stayMax = 0; ret randomScreenRect(w, h); } }