Add wyswietl_stan
This commit is contained in:
parent
8c1495992f
commit
411732e821
@ -16,3 +16,9 @@ class Jednostka(ABC):
|
|||||||
if self.zdrowie > 0:
|
if self.zdrowie > 0:
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
def wyswietl_stan(self):
|
||||||
|
print(f'Zdrowie: {self.zdrowie}')
|
||||||
|
print(f'Sila: {self.sila_ataku}')
|
||||||
|
print(f'Zasieg: {self.zasieg_ataku}')
|
||||||
|
print(f'Szybkosc: {self.szybkosc_ruchu}')
|
||||||
|
@ -7,3 +7,7 @@ class Kusznik(Jednostka):
|
|||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return 'K'
|
return 'K'
|
||||||
|
|
||||||
|
def wyswietl_stan(self):
|
||||||
|
print('Kusznik')
|
||||||
|
super().wyswietl_stan()
|
||||||
|
@ -7,3 +7,7 @@ class Lucznik(Jednostka):
|
|||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return 'L'
|
return 'L'
|
||||||
|
|
||||||
|
def wyswietl_stan(self):
|
||||||
|
print('Łucznik')
|
||||||
|
super().wyswietl_stan()
|
||||||
|
@ -7,3 +7,7 @@ class Piechur(Jednostka):
|
|||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return 'P'
|
return 'P'
|
||||||
|
|
||||||
|
def wyswietl_stan(self):
|
||||||
|
print('Piechur')
|
||||||
|
super().wyswietl_stan()
|
||||||
|
Loading…
Reference in New Issue
Block a user