new file: LICENSE new file: README.md new file: enemies.py new file: gameunit.py new file: hero.py new file: main.py new file: tournament.py Changes to be committed:
14 lines
No EOL
220 B
Python
14 lines
No EOL
220 B
Python
# coding: utf-8
|
|
# license: GPLv3
|
|
|
|
|
|
class Attacker:
|
|
_health = None
|
|
_attack = None
|
|
|
|
def attack(self, target):
|
|
target._health -= self._attack
|
|
|
|
def is_alive(self):
|
|
return self._health > 0
|
|
|