If I understand right, you break out if one “star” has no neighbors, right? I like that idea because it is simple. Did you count diagonal as a “neighbor”?