diff --git a/Lesson_4/Task_2/Classes/Magic.cs b/Lesson_4/Task_2/Classes/Magic.cs index 0024c62..2bb046f 100644 --- a/Lesson_4/Task_2/Classes/Magic.cs +++ b/Lesson_4/Task_2/Classes/Magic.cs @@ -10,9 +10,9 @@ namespace Open_Closed.Classes { public class Magic : IMagic { - public void CountYourMagic(IMagicClass MagicClass) + public void CountYourMagic(string MagicType) { - Console.WriteLine($"Your magic is {MagicClass.MagicType}."); + Console.WriteLine($"Your magic is {MagicType}."); } } } diff --git a/Lesson_4/Task_2/Interfaces/IMagic.cs b/Lesson_4/Task_2/Interfaces/IMagic.cs index 417e11d..d2599f7 100644 --- a/Lesson_4/Task_2/Interfaces/IMagic.cs +++ b/Lesson_4/Task_2/Interfaces/IMagic.cs @@ -8,6 +8,6 @@ namespace Open_Closed.Interfaces { public interface IMagic { - void CountYourMagic(IMagicClass MagicClass); + void CountYourMagic(string MagicType); } } diff --git a/Lesson_4/Task_2/Program.cs b/Lesson_4/Task_2/Program.cs index 3177504..207c754 100644 --- a/Lesson_4/Task_2/Program.cs +++ b/Lesson_4/Task_2/Program.cs @@ -1,4 +1,4 @@ using Open_Closed.Classes; -(new Magic()).CountYourMagic(new FireMagic()); -(new Magic()).CountYourMagic(new WaterMagic()); +(new Magic()).CountYourMagic(new FireMagic().MagicType); +(new Magic()).CountYourMagic(new WaterMagic().MagicType);