!7 p-subst { repeat with sleep 1 { currentImage(newBufferedImage(200, 200, Color.gray)); Rect r = randomRect(); r.h = r.h & ~1; // make even Pair p = tossCoin() ? splitRectInVerticalHalves(r) : splitRectInHorizontalHalves(r); if (oneInTwoChance()) p = reversePair(p); fillRect(p.a, Color.black); fillRect(p.b, Color.white); quickShowImage(); } }