Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace _2412
- {
- class Program
- {
- static void Main(string[] args)
- {
- bool youLikesMe = true;
- DialogBranch[] dialog = new DialogBranch[3]
- {
- new DialogBranch("Кто вы?", new string[] { "Человек", "Брандлмуха", "Кхаджит" }),
- new DialogBranch("Что вы хотите?", new string[] { "Победить Аразота", "Стать богатым", "Найти боевых товарищей" }),
- new DialogBranch("Чем вы можете помочь ордену?", new string[] { "Я отличный воин", "Я добротный маг", "Я могу работать в кузнице" })
- };
- Console.WriteLine("Совершенно очевидно, что мы не берём в наш орден кого попало. По этому заполни вот эту анкету, " +
- "и мы примем решение, брать тебя или нет");
- foreach (DialogBranch dialogBranch in dialog)
- {
- Console.WriteLine(dialogBranch.Question);
- for (int i = 0; i < dialogBranch.Answers.Length; i++)
- {
- Console.WriteLine("[{0}]>{1}", i, dialogBranch.Answers[i]);
- }
- int playerAnswer = int.Parse(Console.ReadLine());
- if ( dialogBranch.Answers[playerAnswer] == "Человек" ||
- dialogBranch.Answers[playerAnswer] == "Найти боевых товарищей" ||
- dialogBranch.Answers[playerAnswer] == "Я отличный воин")
- {
- dialogBranch.IsDoorOpen = true;
- }
- }
- foreach(DialogBranch dialogBranch in dialog)
- {
- if(dialogBranch.IsDoorOpen == false)
- {
- break;
- }
- }
- if(youLikesMe)
- {
- Console.WriteLine( "Человек, который хочет найти боевых товарищей, и который является отличным воином, нам подходит. " +
- "Поздравляем, ты принят в орден!");
- }
- }
- }
- class DialogBranch
- {
- public bool IsDoorOpen;
- public string Question;
- public string[] Answers;
- public DialogBranch(string Question, string[] Answers)
- {
- this.Question = Question;
- this.Answers = Answers;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment