Upon further thought, diagonal moves could be handled in vertical order (for DOWN), and simply filtered by the halfway mark of the current table. I think that would make sense. So in that image above, if the upper left corner of slot #5 was to the left of the halfway point of slot #1, then moving #1 down would go through #5 and then #3. But if the upper left corner was to the right of the halfway point of #1, then #1 down would only go to #3. And you would have to go down from #2 to get to #5.
And I agree that if a table is already in the closest slot in the direction, the slot should be skipped, and not swapped out. It will probably take a little bit of work, but should be do-able
And I agree that if a table is already in the closest slot in the direction, the slot should be skipped, and not swapped out. It will probably take a little bit of work, but should be do-able