Added the code for motion of player

Added the code for motion of player
in the create and update function