I'm making a command-line interface game. I'll explain it in more detail once I've gotten every last detail down, but it revolves around my house.
![Smiley :)](https://www.computerhope.com/forum/Smileys/classic/smiley.gif)
Each room is a separate class, or object. Normally, I'd have each object in the room inherit from the room, with its own properties, in a "has-a" relationship. However, due to the nature of the game, the member functions are various commands that can be executed. That is the purpose behind
int main(): To accept commands, parse them based on what room is in use, and pass control to another parser which parses on a room-by-room basis. In a sense, I outsourced
int main() for the most part. The class member functions take up the majority of the work. But I'm still writing them. Then, there's the minor setback I found this morning, which was the result of coding at midnight.
![Smiley :)](https://www.computerhope.com/forum/Smileys/classic/smiley.gif)
When the project is tentatively complete, I'll post the game and ask for playtesters to look for bugs. That should be... interesting. I personally like to think my code is foolproof after all this coding, but I know that I have to have made mistakes.
As for my whitespace preferences, it's rather simple: I leave blank lines between functions and classes. Classes are also broken with whitespace per section, i.e. constructors and destructors are separate from the list of possible commands, etc. I also will devote some space, if necessary, to comments. I'd say about 80% of my lines are actually used for code.
![Smiley :)](https://www.computerhope.com/forum/Smileys/classic/smiley.gif)
EDIT: Oh, and to make sure I can read it: I liberally indent. 3 spaces for anything inside an opening brace (I've nested as far as 9), with each closing brace lined up with its partner.