Ejemplo n.º 1
0
        public static void juegoAnimales()
        {
            Console.WriteLine("Jueguemos adivinar animales");
            Boolean        otroJuego = true;
            AdivinaAnimal  juego     = new AdivinaAnimal();
            ManejoArchivos a         = new ManejoArchivos();
            nodo           b;
            DibujaArbol    c = new DibujaArbol();

            do
            {
                Console.WriteLine("1. Jugar");
                Console.WriteLine("2. Ver grafo");
                string dato = Console.ReadLine();
                switch (dato)
                {
                case "1":
                    juego.jugar();
                    Console.WriteLine("Jugamos otra vez");
                    otroJuego = juego.respuesta();
                    break;

                case "2":
                    b = a.LlenaelArbol();
                    c.generarArbol(ref b);
                    Console.WriteLine("Su imagen está en: ");
                    Console.WriteLine("C:/Users/villa/Desktop/5to Semestre/Programación III/clases/ArbolPrimer/bin/Debug/netcoreapp3.1//ABB.png");
                    break;

                default:
                    Console.WriteLine("a opcion no está crack");
                    break;
                }
            } while (otroJuego);
        }
Ejemplo n.º 2
0
 private void XFORM_Load(object sender, EventArgs e)
 {
     graf     = new DibujaArbol();
     analisis = new Sintactico("traduccion.xform");
     treeView1.AfterSelect += treeView1_AfterSelect;
 }