The easiest way to combat this problem will be to store a pointer to the last square that had an overlap begin. Of course, this won’t necessarily work if a new square can begin an overlap, before the last one is ended.
The easiest way to combat this problem will be to store a pointer to the last square that had an overlap begin. Of course, this won’t necessarily work if a new square can begin an overlap, before the last one is ended.