Created a player class with movement function