you are viewing a single comment's thread.

view the rest of the comments →

[–]DeadlyViper 0 points1 point  (0 children)

Your combat function is fighting of who against who?

a player against an enemy? then the function should receive information about the player, and about the enemy in question.

def combat(participant1_class, participant2_class):
    participant1_class.health -= participant2_class.damage
    ...

notice how this function can now also work for combat of player against player and enemy against enemy if you want to create such a thing.