from obj.inventory import Inventory class TradeHub: 'Contains items to sell' def __init__(self, name): self.name = name self.items = Inventory() def addItems(self, items): for item in items: self.items.addItem(item, 100) def getItems(self): return self.items def printItems(self): print(f"{'Name' : <15}{'- - - - - | - - - - -' : ^10}{'Cost' : >6}") print() for slot in self.items.getInventory(): print(f"{slot.getName() : <15}{'* * * * * | * * * * *' : ^10}{str(slot.getPrice()) : >5}") print()