'equals' and 'hashcode' implementation for the 'Player' class