This repository has been archived on 2026-06-15. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
The-Adventure-Game/classes/Player.py
T

17 lines
455 B
Python

class Player:
def __init__(self, name:str, type:dict, species:dict):
self.name = name
self.type = type
self.species = species
self.inventory = []
self.inventory_size = species["inventory_size"]
def get_inventory(self):
return self.inventory
def attack(self):
pass
def __str__(self):
return f"{self.__class__.__name__} | Name :{self.name}\nType :{self.type}\nSpecies :{self.species}\nInventory: {self.inventory}"