Finished movement code, after finally figuring out the wraparound and cell-clearing logic.

Should be usable right now, if it compiles. Hasn't been tested at all, of course.

See #165