❔ 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?
F
fateos•400d ago
My first thought was that the Sword Class inherits from SwordBehavior but that would be multiple inheritance so that doesnt work
A
Accord•399d ago
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
51KMembers
View on DiscordWant results from more Discord servers?
More Posts✅ telling a console app to exithow do i tell a console app to stop and close the window?❔ I need help for my GameCan everyone help me with my game for my school project, I need help with the scripting? My Code doe❔ Microsoft.XmlSerializer.Generator causes failure to load assembly System.RuntimeHey all, as a way to get my program running under NativeAOT I've been looking into the Microsoft.Xml✅ Make method implemented in interface accessible from implementing typei have an interface ```csharp
interface ICL
{
public IEnumerable<ICLPlatform> GetPlatforms()
{
❔ ASP.NET, MongoDB, C#does anyone have experience with c#, mongodb and ASP.NET? I have a project and I need to get data to✅ Is there a working code editor for blazor server?i found one for blazor wasm https://github.com/serdarciplak/BlazorMonaco but that one does not work