Example #1
0
        public void jugar()
        {
            Console.CursorVisible = false;


            this.tablero = CargarRecurso.Ejecutar(this.tablero);



            do
            {
                Dibujar.ejecutar(this.tablero);

                this.tablero = Actualizar.ejecutar(this.tablero);
            } while (!this.tablero.Salir);

            this.tablero = DescargarRecurso.ejecutar(this.tablero);


            Salir.ejecutar();
        }
Example #2
0
        public static CampoMinado.Tablero ejecutar(CampoMinado.Tablero tablero)
        {
            ConsoleKey tecla;

            tecla = Console.ReadKey().Key;


            if (tecla == ConsoleKey.Spacebar)
            {
                tablero.Personaje.Disparar(tablero.Personaje.X, tablero.Personaje.Y, tablero.Personaje.O, tablero.Enemigo1.X, tablero.Enemigo1.Y, tablero.Enemigo2.X, tablero.Enemigo2.Y);
            }
            tablero.Personaje.Mover(tecla);

            if (tecla == ConsoleKey.Escape)
            {
                tablero.Salir = true;
            }



            return(tablero);
        }
 public static CampoMinado.Tablero ejecutar(CampoMinado.Tablero tablero)
 {
     tablero.jugadores.GuardarArchivo();
     tablero = null;
     return(tablero);
 }