More OOP in Python

Here is another Python module I just finished. I'm learning how to use classes and other Object Oriented Programming (OOP) ideas vs. my old way of thinking using functions. At first it was extremely difficult to think in OO ways; the first time I tried to create a character-creator program I got about halfway before I got confused.

This time it went easier, most likely because I revised what was needed for a basic character and designed for that. Plus, I didn't just try to pull over my procedural-based modules and make it work; I rewrote the code in a more OO way and had many fewer errors this time.

(One of the benefits of coding in Python, whether it will be your final code or if you use it to "flesh-out" your ideas before you write it in C++, Java, etc., is that you don't have to wait for a code-compile-debug cycle. The largest parts of this module [attribute generation and skill selection] probably took me 3 hours each to code and troubleshoot. I don't know what the normal "turnaround" for you experienced programmers is, but that's quite an achievement for me. Especially considering I'm learning the language as I go.)

The code below is a complete module for creating a generic character; you just have to have a copy of my dice rolling program to make it work. It's an interactive console program (GUI version coming later) that will let you choose a name, gender and skills and will output your name, gender, age, attributes, hit points, chosen skills, and a generic equipment list.

Because I use the SPE IDE for my coding environment, some of the commented sections may not make sense. SPE uses these special comments to highlight sections, making it easier to mark off areas and jump to sections.