Refactored player class to inherit from entity