C
C#2y ago
fateos

❔ Class Diagram Design question

So I am doing this design puzzle in Heads First Design Pattern book. So for those who don´t know this is the solution: Now since I had started my own mini MUD game (just single player console no network stuff) I wanted to implement this Design aswell.(IWeaponBehavior) So far so good. The part I dont understand is how do I connect the Character class, IWeaponBehavior interface with the Item class? Like I also wanna implement different kind of swords aswell which will inherit from the Sword class... Can anyone lend me a hand?
2 Replies
fateos
fateosOP2y ago
My first thought was that the Sword Class inherits from SwordBehavior but that would be multiple inheritance so that doesnt work
Accord
Accord2y ago
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server