Added constructor params
This commit is contained in:
parent
c454d8d328
commit
5e021ca087
@ -1,9 +1,9 @@
|
|||||||
class Statistics:
|
class Statistics:
|
||||||
def __init__(self):
|
def __init__(self, hp, hunger, thirst, stamina):
|
||||||
self.hp = 100
|
self.hp = hp
|
||||||
self.hunger = 100
|
self.hunger = hunger
|
||||||
self.thirst = 100
|
self.thirst = thirst
|
||||||
self.stamina = 100
|
self.stamina = stamina
|
||||||
|
|
||||||
# methods that don't let the values pass below 0 and over 100 during change
|
# methods that don't let the values pass below 0 and over 100 during change
|
||||||
def set_hp(self, hp_diff):
|
def set_hp(self, hp_diff):
|
||||||
@ -42,5 +42,3 @@ class Statistics:
|
|||||||
else:
|
else:
|
||||||
self.hp = 100
|
self.hp = 100
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user