Neatly rearrange tile group after selected.
In this code there are two methods of achieving this
rearrangement. The first is complicated and likely overkill
but it keeps the checks for run and set intact. It is
currently commented out and thus the second method is being
used. The second method is slicker and cleaner, using pointers
instead of an excessive number of loops. But it needs to be
tweaked as the group of pointers is incompatible with the
current checks for run and set.