rewrote movePlayer

rewrote movePlayer() with new parameters.