The get_objects fuction is what's being returned and showing a location, >[<main.things object at 0x000002624BB2BDF0>] This is my first time doing OOP. How do I show the actual list.
class room():
def __init__(self, name):
self.__exits = {}
self.__name = name
self.__description = None
self.__objects = []
def add_objects(self, things):
self.__objects.append(things)
def get_objects(self):
return self.__objects
class things(room):
def __init__(self, name, is_weapon):
self.name = name
self.weapon = is_weapon
def weapon(self):
self.is_weapon = True
def not_weapon(self):
self.is_weapon = False
currentRoom = center
alive = True
while alive:
print(currentRoom.get_name())
print(currentRoom.get_desc())
print("Objects here: ",currentRoom.get_objects())