1
Programming / Re: Inventory
« on: September 12, 2009, 04:27:35 PM »
I would remove the Weapon, Armor, etc classes and have everything be an Item, and add a field for the type of item. Sometimes object-orientation is more trouble than it's worth. This method will require more space (every item will have "damage" and "armor_class" fields, no matter what type of item it is), and it isn't as safe, but it's simpler.