Online-safe tile movement.

I’m having trouble understanding. Sorry, in still figuring this stuff out.

Can you write me an example of how you would do it in C++ ?