Questions on Classes
I'm wanting to use classes for my game.
I want to be able to move north, south, east, or west and while I move I want to see descriptions of the new areas that I am walking into.
Keep in mind that this is going to be a text base game (MUD).
I'm really confused with all of this code that the tutorial pasted for me.
I understand the public, private, and protected parts. I also understand the constructor and destructor.
I just am really confused on how to get my character to walk and see the descriptions I give for rooms.
Any help is appreciated.
well you need to put some brief code to explain your dilemma.
if you have been copying and pasting large chunks of code, then its going to take you a long time to understand what is going on there, if its all new stuff to you, its not a good idea to wholesale copy stuff around, even your own code can give you issues.
your basic class in this example would really just describe your character, or a type of character and its attributes, current status etc.
Movement in text based game? You have to think about how you can represent this concept to the player of the game, and then try and build that into your code, i dont think the character class should look after this aspect itself, but maybe it could include data to describe a characters current movement speed and direction for example, i have never coded a text game myself though so am just thinking aloud.
The simplest way to show cover movement is to just show a message after choosing an action / direction i reckon