SexualLobster/ActualEntity — pull request #1 by dymatic (2013-08-08 15:35:36+00:00)
Title: ActualEntity rewrite - Remember to git merge

I ended up rewriting everything, except for some code in your main function. Main now runs on a Programming Pattern called Facade. http://en.wikipedia.org/wiki/Facade_pattern

Facade takes a subsystem and abstracts it. You had functions like info(), version(), and game() in an if tree. That is fine, but as your project grows the if tree will grow with it. With Facade, you have a vector of name - function pairs. We defined function at the top of the file to be a pointer to a function taking and returning an int, and a c_str. When Facade gets "info" from the command line (./ae info), it will run the "info" function automatically.

I also changed the way the name files worked. Now you define what kind of name you are about to write, and then write it out afterwards. For instance:

male:Exocom
female:Claire
last:Jenkins

This will also help your project grow without becoming unmanagable. I would comment some of the harder code, but "meh". Watch out for TRIM, because that's a fucking stupid way of using preprocessor directives.

The code is shorter, but it is now a bit harder to understand. Even though it's harder to understand, it's easier to continue from this point. You win some and lose some.