コード例 #1
0
        public List <Jugar> LeerJuegos()
        {
            OracleCommand cmd;
            List <Jugar>  juegos = new List <Jugar>();
            Jugar         j;

            cmd             = new OracleCommand("SELECT * FROM JUGAR", _bd);
            cmd.CommandType = System.Data.CommandType.Text;

            try
            {
                OracleDataReader aux = cmd.ExecuteReader();

                while (aux.Read())
                {
                    string   nombreJugador   = aux["NOMBRE_JUG"].ToString();
                    string   equipoLocal     = aux["EQUIPO_L_PART"].ToString();
                    string   equipoVisitante = aux["EQUIPO_V_PART"].ToString();
                    DateTime fecha           = Convert.ToDateTime(aux["FECHA_PART"]);
                    int      minutosJugados  = Convert.ToInt32(aux["MIN_JUGAR"]);
                    string   puesto          = aux["PUESTO_JUGAR"].ToString();
                    int      dorsal          = Convert.ToInt32(aux["DORSAL"]);

                    j = new Jugar(nombreJugador, equipoLocal, equipoVisitante, fecha, minutosJugados, puesto, dorsal);

                    juegos.Add(j);
                }
            }
            catch (Exception ex)
            {
                return(juegos);
            }

            return(juegos);
        }
コード例 #2
0
        static void Main(string[] args)
        {
            int[,] MatrizConstruccion = { { 1, 1, 1, 1, 1, 1, 1, 1 }, { 1, 0, 1, 0, 1, 0, 0, 1 }, { 0, 0, 1, 0, 0, 0, 1, 1 }, { 1, 1, 1, 1, 1, 1, 1, 0 }, { 1, 0, 0, 1, 0, 0, 1, 1 }, { 1, 1, 1, 1, 0, 0, 0, 1 }, { 0, 1, 0, 1, 0, 1, 1, 1 }, { 1, 1, 0, 1, 1, 1, 0, 1 } };
            Jugar ejemplo = new Jugar(8, MatrizConstruccion);

            ejemplo.ResolverTablero();
            ejemplo.MostrarMatriz();
        }
コード例 #3
0
ファイル: Partidas.cs プロジェクト: PiewDev/CartasCromy-TP
 public void Preparar()
 {
     try
     {
         this.Jugar = new JuegoCromy();
         Jugar.CargarMazo(Mazo);
     }
     catch (Exception e)
     {
         throw e;
     }
 }
コード例 #4
0
ファイル: Partidas.cs プロジェクト: PiewDev/CartasCromy-TP
 public void Comenzar()
 {
     Jugar.RepartirCartas();
 }