Save entities

This commit is contained in:
Yohann D'ANELLO
2020-11-19 00:10:37 +01:00
parent 657345e6f7
commit 81b20b72bc
5 changed files with 56 additions and 119 deletions

View File

@ -81,13 +81,6 @@ class Rabbit(Monster):
super().__init__(name="rabbit", strength=strength,
maxhealth=maxhealth, *args, **kwargs)
def save_state(self) -> None:
"""
Saves the state of the entity into a dictionary
"""
d = super().save_state()
d["type"] = "Rabbit"
class TeddyBear(Monster):
"""
@ -97,10 +90,3 @@ class TeddyBear(Monster):
*args, **kwargs) -> None:
super().__init__(name="teddy_bear", strength=strength,
maxhealth=maxhealth, *args, **kwargs)
def save_state(self) -> None:
"""
Saves the state of the entity into a dictionary
"""
d = super().save_state()
d["type"] = "Teddy"