I had a few questions:Firstly, How could I make this so rather than moving through rooms using while loops, the player class would register as actually being an attribute as the room class? I'm not sure how to explain this, but I feel like the way i'm doing it now is just ineffective and there is a better way.

Secondly, When I run this code and try to move into the other room by inputting "e", the variable tork.x gets increased by one but it does not activate the while loop below it which is suppose to activate when tork.x=1.

Sorry if i'm going everywhere with this. I'm brand new to Python and appreciate any advice you guys can give me. Kthnx!

A Metal Hallway This place is dimly lit and cool ---------------------------------------------------- You stand in the middle of an intersection in a metal room. There are blue glowing lamps lighting this area up. There is a sign on the wall. ---------------------------------------------------- Obvious exits:East, North""", True)

room2=Room(-1, 0, "This is a large metal room", False)room3=Room(1, 0, """ Thacker's Main Control Room This place is well lit and cool ---------------------------------------------------- There are multiple panels throughout with a variety of levers and buttons. People stand in uniforms infront of computers, which are scattered throughout the room. There is a glass window here revealing space. Thacker is sitting here in the back of the room in a large chair. ---------------------------------------------------- Obvious exits:West""", False)

room4=Room(0, 1, "This is a large metal room", False)

room5=Room(0, -1, """ Large Hanger Bay This place is well lit and cool ---------------------------------------------------- There are a variety of mobile suits here ---------------------------------------------------- Obvious exits:South""", False)

theillbehaviored wrote:When I run this code and try to move into the other room by inputting "e", the variable tork.x gets increased by one but it does not activate the while loop below it which is suppose to activate when tork.x=1.

Why should it activate when tork.x == 1?You are comparing it to room2.x which is set to -1

theillbehaviored wrote:How could I make this so rather than moving through rooms using while loops, the player class would register as actually being an attribute as the room class? I'm not sure how to explain this, but I feel like the way i'm doing it now is just ineffective and there is a better way.

In my opinion, there are a lot of better ways to do this. But there is no better way of learning than to create some bad code at first and then realizing how you could make it better. Don't always worry about 'the best way' to do something. Just enjoy doing it the way you know how, even if it's ineffective, and take a look at it afterwards to see if you can improve it.Just my 2 cents as I've thrown a lot of fun and educational projects out of the window because I didn't think it was the 'correct' way to write it.

Other than that, well your main game loop will be a while loop obviously. I like having rooms in a dictionary where the keys are coordinate locations. This allows you to easily create a map but efforts have to be gone to to make different rooms feel unique. There are tons of ways to go about this--I think the most challenging part is trying to develop a flexible framework that will work with a lot of different situations. The easiest way is the least flexible, being to write custom logic for each individual room/area. This would get you a working project quickly but adding things is more arduous.

As hansn said, your first goal should be to get "something" working. Never mind how or what. Afterwards you and others can look over it and talk about other, perhaps better, ways to accomplish the same thing.