Sorry for how terrible the title is... I'm a complete Python beginner, I don't know what any of this is called.
I have 2 files, main.py and stuffs.py. I removed parts of my code unnecessary to the question.
My code:
# stuffs.py
from main import main
class Location:
def __init__(self, name, des):
self.name = name
self.des = des
self.connection = {}
self.items = []
self.mats = []
def connect(self, nesw, loc):
self.connection[nesw] = loc
reverse = {
"south": "north",
"east": "west",
"in": "out",
"down": "up"
}[nesw]
loc.connection[reverse] = self
class Player:
def __init__(self, current_loc, hp, stamina, warmth):
self.current_loc = current_loc
self.hp = hp
self.sta = stamina
self.warmth = warmth
self.inventory = Inventory()
class Stuff:
def __init__(self, time, day, mvp):
self.time = time
self.day = day
self.mvp = mvp
self.player = Player(main.r1, 100, 100, 100) # The part I need help with!!
# main.py
def main():
r1 = Location("Your bedroom", "[]")
Obviously main.r1 wouldn't work but I'm not sure what to do... (Also, I'm aware my code is probably very inefficient, but for now it just needs to work, haha.) Thank you!