Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

1
  • 2
    Depending on the specifics, it may be preferable to use interfaces. Sword and MagicCloth might both implement a Weapon interface (with a getAttackMod() method), Shield and MagicCloth might both implement Armor, and MagicCloth might also implement ... Speed, I suppose, though that name could use some work. The player then doesn't need to know about every possible weapon, just how to handle Items that implement Weapon. Commented Mar 28 at 21:40