Пример #1
0
        internal void mostrar()
        {
            GestorIO gestorIO = new GestorIO();

            foreach (String titulo in TITULOS)
            {
                gestorIO.mostrar(titulo);
            }
        }
Пример #2
0
        public void recoger()
        {
            GestorIO gestorIO = new GestorIO();

            gestorIO.mostrar("Inferior?");
            setInferior(gestorIO.inDouble());
            gestorIO.mostrar("Superior?");
            setSuperior(gestorIO.inDouble());
        }
Пример #3
0
        public void mostrar()
        {
            GestorIO gestorio = new GestorIO();

            gestorio.mostrar(string.Format("{0}{1}:", "\n", this.titulo));
            if (this.vacia())
            {
                gestorio.mostrar("<VACIA>");
            }
            else
            {
                this.mostrarContenido();
            }
        }
Пример #4
0
        internal int getOpcion()
        {
            GestorIO gestorIO = new GestorIO();
            int      opcion;
            Boolean  error;

            do
            {
                gestorIO.mostrar("\nOpción? [1-9]: ");
                opcion = gestorIO.inInt();
                error  = !OPCIONES.incluye(opcion);
                if (error)
                {
                    gestorIO.mostrar("Error!!! La opción debe ser entre 1 y 9");
                }
            } while (error);
            return(opcion);
        }
Пример #5
0
        private Palo recogerPalo(string prefijo)
        {
            GestorIO gestorio = new GestorIO();
            int      palo;
            Boolean  error;

            do
            {
                gestorio.mostrar(string.Format("¿{0} qué palo?[1-{1}]", prefijo, Baraja.NUM_PALOS));
                palo  = gestorio.inInt();
                error = !new Intervalo(1, Baraja.NUM_PALOS).incluye(palo);
                if (error)
                {
                    gestorio.mostrar(string.Format("Error!!! Debe ser un número entre 1 y {0}", Baraja.NUM_PALOS));
                }
            } while (error);
            return(palos[palo - 1]);
        }
Пример #6
0
        private Columna recogerColumna(string prefijo)
        {
            GestorIO gestorio = new GestorIO();
            int      columna;
            Boolean  error;

            do
            {
                gestorio.mostrar(string.Format("¿{0} qué columna?[1-{1}]", prefijo, NUM_COLUMNAS));
                columna = gestorio.inInt();
                error   = !new Intervalo(1, NUM_COLUMNAS).incluye(columna);
                if (error)
                {
                    gestorio.mostrar(string.Format("Error!!! Debe ser un número entre 1 y {0}", NUM_COLUMNAS));
                }
            } while (error);
            return(columnas[columna - 1]);
        }