Logics added to the player class

A new behavior for the Player class is added