mipt-dragons/gameunit.py
nihonium c674151180 new file: .gitignore
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:
2021-11-15 11:58:38 +03:00

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