Changed the code for movement to fix bug where it was possible to jump to a black room in the emulator