Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Console.WriteLine("Select what you want to do: (write the number before the action)");
- Console.WriteLine("1. Skip");
- Console.WriteLine("2. Fight");
- Console.WriteLine("3. Deal");
- Console.WriteLine("4. Speak");
- int action = 1;
- do
- {
- action = int.Parse(Console.ReadLine());
- } while (action < 0 || action > 4);
- switch (action)
- {
- case 1:
- return HeroActionType.Skip;
- case 2:
- return HeroActionType.Fight;
- case 3:
- return HeroActionType.Deal;
- case 4:
- return HeroActionType.Speak;
- }
- // default case
- return HeroActionType.Skip;
- showaheroactio
- switch (action)
- {
- case HeroActionType.Skip:
- Console.WriteLine($"You skipped the {opponent.Name}");
- break;
- case HeroActionType.Fight:
- Console.WriteLine($"You fight with " + opponent.Name + "you have" + Game.MyHero.Power +
- "power left" + Game.MyHero.Gold +
- " gold and your experiance is" + Game.MyHero.Experience);
- break;
- case HeroActionType.Deal:
- Console.WriteLine($"You deal with {opponent.Name}");
- break;
- case HeroActionType.Speak:
- Console.WriteLine($"You speak with {opponent.Name}");
- break;
- default:
- break;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement