Added some code to the Player class.