Added new functions for Player.java and tests for PlayerTest.java.