Exemplo n.º 1
0
        public void SetUp()
        {
            Console.WriteLine("Welcome to our little corner of reality.\nLet's have some fun.");
            Console.Write("First off, what is your name? ");
            string name = Console.ReadLine();

            Console.WriteLine("Are you a a wizard or a fighter?\n\t1) Wizard\n\t2) Fighter");
            int val = -1;

            do
            {
                Console.Write("Enter 1 or 2 to continue : ");
                try
                {
                    val = int.Parse(Console.ReadLine());
                }
                catch (Exception) { };
            } while (val != 1 && val != 2);

            if (val == 1)
            {
                Mage.New(name);
            }
            else
            {
                Mage.New(name);
            }
        }
Exemplo n.º 2
0
 public static void New(string name)
 {
     instance = new Mage(name);
 }