Exemple #1
0
        static void Main(string[] args)
        {
            int  i = 0;
            char op;

            do
            {
                Partidas p = new Partidas();
                p.ActualizarYOrdenar();
                Console.WriteLine("Juego: Ahorcado");
                Console.WriteLine("1. Ver mejores partidas");
                Console.WriteLine("2. Jugarse una");
                Console.WriteLine("0. Salir");
                try
                {
                    op = Convert.ToChar(Console.ReadLine());
                }
                catch (Exception e)
                {
                    Console.WriteLine("Error: " + e.Message);
                    Console.WriteLine("Se saldra de la aplicacion");
                    Console.ReadKey();
                    op = '0';
                }
                switch (op)
                {
                case '1': OpcionVerMejoresPartidas(); break;

                case '2': OpcionJugar(i); i++; break;

                default: op = '0'; break;
                }
                Console.Clear();
            } while (op != '0');
        }