I programmed this on my phone, so I can't really test it (I can't use arrow keys). Still, I do think this can run bug-free, but let me know of anything I may have forgotten in coding this in the Comments.
Move with arrow keys. If you touch a side of the playing screen, the screen changes to be a different panel. This project is a 200x200 map.