move main game logic to player class