Comment by WalterBright

4 months ago

For me something similar. I was using lots of if-then for the program logic, and a fellow student showed me how to replace that with an array. Wow!

Another epiphany was when I was reading the source code for ADVENT (the original Adventure game). There was a comment in the listing "A troll is a modified dwarf". And voila! I discovered inheritance.