add load and save functions to classes
move files update character creater to allowing to stack classes
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
import logging
|
||||
|
||||
LOGGING = logging.getLogger(__name__)
|
||||
class Player:
|
||||
def __init__(self, name:str, type:dict, species:dict, combineble_species:dict):
|
||||
self.name = name
|
||||
self.type = type
|
||||
self.species = species
|
||||
self.combineble_species = combineble_species
|
||||
self.inventory = []
|
||||
self.inventory_size = species["inventory_size"]
|
||||
|
||||
def get_inventory(self):
|
||||
return self.inventory
|
||||
|
||||
def get_species_name(self):
|
||||
return self.species['name']
|
||||
|
||||
def get_name(self):
|
||||
return self.name
|
||||
|
||||
def attack(self):
|
||||
pass
|
||||
|
||||
def __str__(self):
|
||||
return f"{self.__class__.__name__} | Name: {self.name} - {self.type}\nSpecies: {self.species}\nInventory: {self.inventory}\nCombineble Species: {self.combineble_species}"
|
||||
Reference in New Issue
Block a user