Coding
PromptBeginner5 minmarkdown
Nano Banana Pro
Agent skill for nano-banana-pro
7
- open de `ConsoleMonGame` solution
Sign in to like and favorite skills
ConsoleMonGame solutionSkill.csWe hebben 2 constructors nodig:
Skillpublic!! dit is de default constructor
Skillinternalthis.A= A constructie voor alle argumenten om de class properties te vullenvervang 'TestConstructors' met de code hieronder in
Program.cs in je Program class.
roep
TestConstructors aan in je Main function
True verschijnen onder TestConstructors? dan klopt je code!static void TestConstructors() { Console.WriteLine("TestConstructors"); ConsoleMon mon = new ConsoleMon(200,200,"ConsoleColorMon",Element.Earth); Console.WriteLine(mon.energy == 200); Console.WriteLine(mon.name == "ConsoleColorMon"); Console.WriteLine(mon.health == 200); Console.WriteLine(mon.weakness == Element.Earth); Skill skill = new Skill(90, 80, "FireBlade", Element.Fire); Console.WriteLine(skill.energyCost == 80); Console.WriteLine(skill.name == "FireBlade"); Console.WriteLine(skill.damage == 90); Console.WriteLine(skill.element == Element.Fire); }
commit & push naar je git!