player.cs refactoring