Implemented movePlayer Function