implemented the addBadge function for a player