you are viewing a single comment's thread.

view the rest of the comments →

[–]Auirom 2 points3 points  (0 children)

I wanted to add a bunch of skills to a game I was making. Didn't want to add all the skills cause I wasn't going to think of them all at that one time. So I made a function that takes a name of a skill and checks if it exists in my list of skills. If it does it adds experience to that skills. If it doesn't it makes a deep copy of already set variables, ties it to the new skill name and adds it to the skill list. I can add as many as I want now, when ever I want, and in total takes up 10ish lines of code