Improved code style of player class