Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Player:
- def __init__(self, name, health, attack):
- self.name = name
- self.health = health
- self.attack = attack
- class Enemy:
- def __init__(self, name, health, attack):
- self.name = name
- self.health = health
- self.attack = attack
- def fight(player, enemy):
- # Your code here
- return ""
- # Example usage
- p = Player("Hero", 100, 20)
- e = Enemy("Bat", 50, 10)
- print(fight(p, e))
Advertisement
Add Comment
Please, Sign In to add comment