Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for (int i = 0; i < 10; i++)
- {
- int wizardAttack = wizard.GetAttackStrength();
- witcher.TakeAttack(wizardAttack);
- int witcherAttack = witcher.GetAttachStrength();
- wizard.TakeAttack(witcherAttack);
- if (!wizard.IsAlive()) break;
- if (!witcher.IsAlive()) break;
- Console.WriteLine($"Witcher {witcher.Name} points: {witcher.HP}");
- Console.WriteLine($"Wizard {wizard.Name} points: {wizard.HP}");
- }
- if (wizard.HP > witcher.HP)
- {
- Console.BackgroundColor = ConsoleColor.Red;
- Console.WriteLine($"Wizard {wizard.Name} won!");
- Console.WriteLine($"Witcher {witcher.Name} points: {witcher.HP}");
- Console.WriteLine($"Wizard {wizard.Name} points: {wizard.HP}");
- }
- else
- {
- Console.BackgroundColor = ConsoleColor.Red;
- Console.WriteLine($"Witcher {witcher.Name} won!");
- Console.WriteLine($"Witcher {witcher.Name} points: {witcher.HP}");
- Console.WriteLine($"Witcher {wizard.Name} points: {wizard.HP}");
- }
- Console.ReadLine();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement