so, i have a bit of a problem here. (it might be confusing, i'll explain it) whenever i try to run my program, game.py, i run into an error telling me that "maptile" cannot be imported, however it exists as a class and said class is what i'm trying to import. can anyone help me?
this part might make it a bit hard: there are multiple files, and the error is coming from actions.py, which is where i'm trying to import "maptile". however, in tiles.py, which is where maptile is defined, it's defined on the third line. to combat this error, i moved the import of maptile (in actions.py) down to line 10 or 13. this would mean the import is happening after maptile is defined. i still got the error.
the import (that i think is where the error is coming from):
from tiles import MapTile
the error:
Traceback (most recent call last):
File "C:\Users\littl\OneDrive\Documents\Python
Programs\adventuregame\game.py", line 1, in <module>
import world, tiles, actions, enemies
File "C:\Users\littl\OneDrive\Documents\Python
Programs\adventuregame\tiles.py", line 1, in <module>
import items, enemies, actions, world
File "C:\Users\littl\OneDrive\Documents\Python
Programs\adventuregame\actions.py", line 13, in <module>
from tiles import MapTile
ImportError: cannot import name 'MapTile'
if you need any more information, i can give it to you.