- Code: Select all
player.useAbility(ability, target)
But I don't know how to do this since target can either be of type Player or Enemy. I'm hoping to avoid duplicating the useAbility method into a useAbilityOnFriendly and useAbilityOnEnemy that are identical except for the target type.
Any thoughts on what would be a good (clean) way to do this?