On 7/27/07, Kai Sterker <[EMAIL PROTECTED]> wrote: > > Finally ... :-). > > I had a look at the code and there are a couple of things that I > noticed. Hope I'm not too picky ;-).
You're the architect. Picky is part of your job description. :) Also, if my code is ever crap, I want to know it, so I can fix it and learn from my mistakes. 1) Practically all of the ability, attribute, property and skill > classes have members name, cost and currentVal/rank in common. Having > this in a common, possibly abstract base class would avoid a lot of > code duplication. > > 2) Not so sure about that one. It might make sense to give the > property class a pointer to its underlying attribute. If the > implementation of getCurrentVal would be dynamically based on that > attribute, the property would always be up-to-date, even though the > value of the attribute changes. I've noticed the similarity in the classes and the possible uses of tying properties directly to their underlying attributes. I'll work on getting properties pointer-based. As for the abstraction, I'll work on a way to do that as well. 3) Mostly cosmetic. Not sure if there are any standard naming > conventions in the C++ world. If so, Adonthell doesn't follow them > ;-). However, we have our own set of rules that are followed more or > less throughout the codebase. Maybe they would be followed better if > they were documented somewhere ;-). Most importantly, class, method > and function names are all lower case, using underscore (_) as > delimiter between words. I'm not sure if there are, either. I think it's more of a meta-standard, in which both camel casing and underscore usage are acceptable. I started into programming by learning Pascal in high school, then got into C++ and Perl, so I camel case extensively. All in all, I believe implementing number (1) and partially following > (3) would be beneficial for now. Changing the naming conventions will be the easier of the two, but I'll see to both and leave 2 for later. I could also possibly zip my Windows dev environment and upload it > somewhere, if that would be of some use to you. I start to like how > the combination of CTD 4.0/Eclipse 3.3 has turned out (although I'm > also looking forward to XCode 3.0). I played around with Eclipse a little before my machine when toes up. I'd probably use a MinGW/Eclipse toolchain once the option is open to me. Andrew
_______________________________________________ Adonthell-devel mailing list Adonthell-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/adonthell-devel