Linting
This commit is contained in:
@@ -15,7 +15,7 @@ class Player(FightingEntity):
|
||||
max_xp: int = 10
|
||||
inventory: list
|
||||
paths: Dict[Tuple[int, int], Tuple[int, int]]
|
||||
hazel: int #It is the currency of this game
|
||||
hazel: int # It is the currency of this game
|
||||
|
||||
def __init__(self, name: str = "player", maxhealth: int = 20,
|
||||
strength: int = 5, intelligence: int = 1, charisma: int = 1,
|
||||
@@ -91,7 +91,7 @@ class Player(FightingEntity):
|
||||
elif entity.is_item():
|
||||
entity.hold(self)
|
||||
elif entity.is_friendly():
|
||||
# self.map.logs.add_message(entity.talk_to(self))
|
||||
# self.map.logs.add_message(entity.talk_to(self))
|
||||
self.map.logs.add_message(self.hit(entity))
|
||||
if entity.dead:
|
||||
self.add_xp(randint(3, 7))
|
||||
@@ -124,12 +124,12 @@ class Player(FightingEntity):
|
||||
queue.append((new_y, new_x))
|
||||
self.paths = predecessors
|
||||
|
||||
def add_to_inventory(self, obj : Any) -> None :
|
||||
def add_to_inventory(self, obj: Any) -> None:
|
||||
"""
|
||||
Adds an object to inventory
|
||||
"""
|
||||
self.inventory.append(obj)
|
||||
|
||||
|
||||
def save_state(self) -> dict:
|
||||
"""
|
||||
Saves the state of the entity into a dictionary
|
||||
|
Reference in New Issue
Block a user