Exemplo n.º 1
0
        static void Main(string[] args)
        {
            //initiate variables
            String input = "";
            String arch  = "";
            //parser
            Scripter narrator = new Scripter();

StartGame:
            narrator.NewLine("Welcome to the magical world of Text Adventure!");
            narrator.NewLine("What is your name?");
            centerText(narrator.script);
            narrator.Clear();
            input = Console.ReadLine();
            String name = input;

            bool failedClass = false;

            narrator.NewLine(name + ", huh... Sure. That'll work.");
            narrator.NewLine("And how do you fancy yourself? A Brute? A Clairvoyant? A Bowman, perhaps?");
FailedClass:
            if (failedClass)
            {
                narrator.NewLine("Try again.");
            }
            centerText(narrator.script);
            narrator.Clear();
            input = Console.ReadLine().ToLower();
            if (input == "brute" || input == "clairvoyant" || input == "bowman")
            {
                failedClass = false;
                arch        = input;
            }
            else
            {
                failedClass = true;
                goto FailedClass;
            }

            Player me = new Player(name, arch);

            narrator.NewLine("And so, the journey of " + me.name + " the " + me.archetype + " begins...");
            centerText(narrator.script);
            narrator.Clear();
            me.location = new Room("Kitchen", new bool[] { true, false, false, false }, new List <Room>(), new List <WorldObject>());
            bool quit = false;

            //Game Loop//
            while (quit = false)
            {
                input = Console.ReadLine();
                //String instructions = Parser.Convert(input); needs to be implemented
                //switch (instructions){}
            }
        }