コード例 #1
0
        //string a, double money, Dictionary<string, Dictionary<string, List<int>>> usedCoordinates

        public EdifMarket(string a, double money)
        {
            if (a == "P") //Plantacion
            {
                PlantationPurchase p = new PlantationPurchase();
                //string a, double money, Dictionary<string, Dictionary<string, List<int>>> usedCoordinates
            }

            else if (a == "G") //Ganado
            {
                CattlePurchase c = new CattlePurchase();
            }

            else if (a == "A")//Edificios de Almacenamiento
            {
                StoragePurchase s = new StoragePurchase();
            }

            else if (a == "C")
            {
                //ConsumablePurchase cp = new ConsumablePurchase();

                Console.WriteLine("Los productos consumibles son: ");
                string inventario = "";

                while (true)
                {
                    string res = Console.ReadLine().ToUpper();
                    if (res == "F")
                    {
                        buyingConsumable.ConsumibleMarket += Consu.OnBuy;
                        buyingConsumable.Buying();
                        money      -= 48.20;
                        inventario += "\nfungicida (cura)";
                    }
                    else if (res == "H")
                    {
                        buyingConsumable.ConsumibleMarket += Consu.OnBuy1;
                        buyingConsumable.Buying();
                        money      -= 80.24;
                        inventario += "\nHerbicida (cura)";
                    }

                    else if (res == "P")
                    {
                        buyingConsumable.ConsumibleMarket += Consu.OnBuy2;
                        buyingConsumable.Buying();
                        money      -= 42.80;
                        inventario += "\npesticida (cura)";
                    }

                    else if (res == "G")
                    {
                        buyingConsumable.ConsumibleMarket += Consu.OnBuy3;
                        buyingConsumable.Buying();
                        money      -= 28.40;
                        inventario += "\nvacuna (cura)";
                    }
                    else if (res == "A")
                    {
                        buyingConsumable.ConsumibleMarket += Consu.OnBuy4;
                        buyingConsumable.Buying();
                        money      -= 33.45;
                        inventario += "\nFertilizante (alimento)";
                    }
                    else if (res == "R")
                    {
                        buyingConsumable.ConsumibleMarket += Consu.OnBuy5;
                        buyingConsumable.Buying();
                        money      -= 56.31;
                        inventario += "\nriego (alimento)";
                    }
                    else if (res == "K")
                    {
                        buyingConsumable.ConsumibleMarket += Consu.OnBuy6;
                        buyingConsumable.Buying();
                        money      -= 44.96;
                        inventario += "\nAlimento para animales (alimento)";
                    }
                    else if (res == "T")
                    {
                        buyingConsumable.ConsumibleMarket += Consu.OnBuy7;
                        buyingConsumable.Buying();
                        money      -= 54.45;
                        inventario += "\nAgua para animales (alimento)";
                    }
                    else if (res == "V")
                    {
                        Console.WriteLine(money);
                        Console.WriteLine("a comprado en total lo siguientes productos:  ");
                        Console.WriteLine(inventario);
                        Console.WriteLine("volviendo al mercado");
                        Console.ReadKey();
                        break;
                    }
                    else
                    {
                        Console.WriteLine("respuesta invalida");
                    }
                }
            }

            else if (a == "V")
            {
            }

            else
            {
                Console.WriteLine("El comando para esta letra no existe");
            }
        }
コード例 #2
0
        public void Amensaje(int a)
        {
            if (a == 0)
            {
                FunctionBrain fb              = new FunctionBrain();
                Seed          nuevaSeed       = new Seed("nombre", 5, 1, 1, 1, 1, 4, 10, 25, 4, 1, 1, 1, 10, 1, 5, 0);
                Plantation    nuevaPlantation = new Plantation("nombre", 5, "A", 1.5, 3, 2, false, 100, 100, 1);
                Cattle        nuevoGanado     = new Cattle("nombre", 2.5, "B", 30, 0.5, 0.2, 1, 1, 2, 1);
                List <string> almacen         = new List <string>()
                {
                    "tomato", "letucce", "carrot", "potato", "corn", "onion", "celery"
                };
                Dictionary <string, (int, int)> ejemplo          = new Dictionary <string, (int, int)>();
                Ir_al_mercado_de_consumibles    buyingConsumable = new Ir_al_mercado_de_consumibles();
                Ir_al_mercado_de_edificaciones  DestSell         = new Ir_al_mercado_de_edificaciones();
                CompraConsumible Consu = new CompraConsumible();
                double           variacion;
                int    maduracionPlanta;
                int    maduracionGanado;
                int    verificandoMaleza;
                int    verificandoGusano;
                int    unidad;
                int    calidad;
                double verificandoMuerte;
                double verificandoEscape;
                double verificandoEnfermedad;
                double verificandoEnfermedadG;
                double compraG;
                double compraP;
                bool   enfermedad;
                bool   enfermedadG;
                bool   gusano;
                bool   maleza;
                bool   muerte;
                bool   escape;
                int    bodegasJugador;
                bool   productoAlmacenado;
                var    random      = new Random();
                int    probaMaleza = random.Next(0, 100);
                int    probaGusano = random.Next(0, 100);
                double probaMuerte = random.Next(0, 100);
                double probaEscape = random.Next(0, 100);
                double probaEnfer  = random.Next(0, 100);
                double ganancia;
                variacion             = nuevaSeed.GetPriceVariation();
                maduracionPlanta      = nuevaPlantation.GetMaturity();
                maduracionGanado      = nuevoGanado.GetMaturity();
                verificandoMaleza     = nuevaPlantation.GetWeedChance();
                verificandoGusano     = nuevaPlantation.GetWormChance();
                verificandoEnfermedad = nuevaPlantation.GetDiseaseChance();
                verificandoEscape     = nuevoGanado.GetScapeChance();
                verificandoMuerte     = nuevoGanado.GetSuddenDeathChance();
                unidad = nuevoGanado.GetUnidad();
                verificandoEnfermedadG = nuevoGanado.GetDesease();
                calidad            = nuevoAlmacen.GetQuality();
                compraG            = nuevoGanado.GetPurchasePrice();
                compraP            = nuevaPlantation.GetPurchasePrice();
                productoAlmacenado = true;
                enfermedad         = false;
                gusano             = false;
                maleza             = false;
                muerte             = false;
                escape             = false;
                bodegasJugador     = 0;
                ganancia           = 0;
                if (a == 0)
                {
                    Console.WriteLine("Administrar grnaja");
                    Console.WriteLine("\nAdministrar produccion [P]");
                    Console.WriteLine("Administrar almacenamiento [A]");
                    Console.WriteLine("\nVOLVER [V]");
                    while (true)
                    {
                        admins = Console.ReadLine().ToUpper();
                        if (admins == "P")
                        {
                            Console.WriteLine("administrar produccion");
                            Console.WriteLine("\nAgregar agua o comida [A]");
                            Console.WriteLine("aplicar cura [C]");
                            Console.WriteLine("obtener producto terminado [T]");
                            Console.WriteLine("\nVOLVER [V]");
                            while (true)
                            {
                                asd = Console.ReadLine().ToUpper();
                                if (asd == "A")
                                {
                                    Console.WriteLine("¿A QUIEN desea agregar agua o comida?");
                                    Console.WriteLine("\nGanado [G]");
                                    Console.WriteLine("Plantacion [P]");
                                    while (true)
                                    {
                                        qwe = Console.ReadLine().ToUpper();
                                        if (qwe == "G")
                                        {
                                            Console.WriteLine("¿QUE desea usar?");
                                            Console.WriteLine("\nComida [C]");
                                            Console.WriteLine("Agua [A]");
                                            Console.WriteLine("\nVOLVER [V]");
                                            while (true)
                                            {
                                                mnb = Console.ReadLine().ToUpper();
                                                if (mnb == "C")
                                                {
                                                    fb.Message(5);
                                                    AliAnimales.Sort();
                                                    while (true)
                                                    {
                                                        ans = Console.ReadLine().ToUpper();
                                                        if (ans == "S")
                                                        {
                                                            for (int i = 0; i < AliAnimales.Count; i++)
                                                            {
                                                                if (AliAnimales[i] == "Alimento para animales")
                                                                {
                                                                    Console.WriteLine("Se ha usado un Alimento para animales");
                                                                    Alimento.Remove("Alimento para animales");
                                                                    AliAnimales.Remove("Alimento para animales");
                                                                    break;
                                                                }
                                                                else
                                                                {
                                                                    Console.WriteLine("no tiene alimento para animales");
                                                                }
                                                            }
                                                            break;
                                                        }
                                                        else if (ans == "C")
                                                        {
                                                            buyingConsumable.ConsumibleMarket += Consu.OnBuy6;
                                                            buyingConsumable.Buying();

                                                            if (cashMoney < 44.96)
                                                            {
                                                                Console.WriteLine("... ESPERA, \nno tienes dinero suficiente vuelva mas tarde");
                                                            }
                                                            else if (cashMoney >= 44.96)
                                                            {
                                                                cashMoney  -= 44.96;
                                                                inventario += "\nAlimento para animales";
                                                                Alimento.Add("Alimento para animales");
                                                                AliAnimales.Add("Alimento para animales");
                                                            }
                                                            break;
                                                        }
                                                        break;
                                                    }
                                                    break;
                                                }
                                                else if (mnb == "A")
                                                {
                                                    fb.Message(5);
                                                    AguAnimales.Sort();
                                                    while (true)
                                                    {
                                                        ans = Console.ReadLine().ToUpper();
                                                        if (ans == "S")
                                                        {
                                                            for (int i = 0; i < AguAnimales.Count; i++)
                                                            {
                                                                if (AguAnimales[i] == "Agua para animales")
                                                                {
                                                                    Console.WriteLine("Se ha usado un Agua para animales");
                                                                    AguAnimales.Remove("Agua para animales");
                                                                    break;
                                                                }
                                                                else
                                                                {
                                                                    Console.WriteLine("no tiene agua para animales");
                                                                }
                                                            }
                                                            break;
                                                        }
                                                        else if (ans == "C")
                                                        {
                                                            buyingConsumable.ConsumibleMarket += Consu.OnBuy7;
                                                            buyingConsumable.Buying();

                                                            if (cashMoney < 54.45)
                                                            {
                                                                Console.WriteLine("... ESPERA, \nno tienes dinero suficiente vuelva mas tarde");
                                                            }
                                                            else if (cashMoney >= 54.45)
                                                            {
                                                                cashMoney  -= 54.45;
                                                                inventario += "\nAgua para animales";
                                                                Alimento.Add("Agua para animales");
                                                                AguAnimales.Add("Agua para animales");
                                                            }
                                                            break;
                                                        }
                                                        break;
                                                    }
                                                    break;
                                                }
                                                else if (mnb == "V")
                                                {
                                                    Console.WriteLine("VOLVIENDO");
                                                    foreach (String items in Alimento)
                                                    {
                                                        Console.WriteLine(items);
                                                    }
                                                    break;
                                                }
                                                else
                                                {
                                                    Console.WriteLine("Ésa respuesta no es válida.");
                                                }
                                            }
                                        }
                                        else if (qwe == "P")
                                        {
                                            Console.WriteLine("¿QUE desea usar?");
                                            Console.WriteLine("\nFertilizante [F]");
                                            Console.WriteLine("Riego [R]");
                                            Console.WriteLine("\nVOLVER [V]");
                                            while (true)
                                            {
                                                ghj = Console.ReadLine().ToUpper();
                                                if (ghj == "F")
                                                {
                                                    fb.Message(5);
                                                    fertil.Sort();
                                                    while (true)
                                                    {
                                                        ans = Console.ReadLine().ToUpper();
                                                        if (ans == "S")
                                                        {
                                                            for (int i = 0; i < fertil.Count; i++)
                                                            {
                                                                if (fertil[i] == "Fertilizante")
                                                                {
                                                                    Console.WriteLine("Se ha usado un Fertilizante");
                                                                    fertil.Remove("Fertilizante");
                                                                    break;
                                                                }
                                                                else if (fertil[i] != "Fertilizante")
                                                                {
                                                                    Console.WriteLine("no tiene fertilizante");
                                                                }
                                                            }
                                                        }
                                                        else if (ans == "C")
                                                        {
                                                            buyingConsumable.ConsumibleMarket += Consu.OnBuy4;
                                                            buyingConsumable.Buying();

                                                            if (cashMoney < 33.45)
                                                            {
                                                                Console.WriteLine("... ESPERA, \nno tienes dinero suficiente vuelva mas tarde");
                                                            }
                                                            else if (cashMoney >= 33.45)
                                                            {
                                                                cashMoney  -= 33.45;
                                                                inventario += "\nFertilizante";
                                                                Alimento.Add("Fertilizante");
                                                                fertil.Add("Fertilizante");
                                                            }
                                                            break;
                                                        }
                                                        break;
                                                    }
                                                    break;
                                                }
                                                else if (ghj == "R")
                                                {
                                                    fb.Message(5);
                                                    riego.Sort();
                                                    while (true)
                                                    {
                                                        ans = Console.ReadLine().ToUpper();
                                                        if (ans == "S")
                                                        {
                                                            for (int i = 0; i < riego.Count; i++)
                                                            {
                                                                if (riego[i] == "Riego")
                                                                {
                                                                    Console.WriteLine("Se ha usado un Riego");
                                                                    riego.Remove("Riego");
                                                                    break;
                                                                }
                                                                else if (riego[i] != "Riego")
                                                                {
                                                                    Console.WriteLine("no tiene Riego");
                                                                }
                                                            }
                                                        }
                                                        else if (ans == "C")
                                                        {
                                                            buyingConsumable.ConsumibleMarket += Consu.OnBuy5;
                                                            buyingConsumable.Buying();

                                                            if (cashMoney < 56.31)
                                                            {
                                                                Console.WriteLine("... ESPERA, \nno tienes dinero suficiente vuelva mas tarde");
                                                            }
                                                            else if (cashMoney >= 56.31)
                                                            {
                                                                cashMoney  -= 56.31;
                                                                inventario += "\nriego";
                                                                Alimento.Add("Riego");
                                                                riego.Add("Riego");
                                                            }
                                                            break;
                                                        }
                                                        break;
                                                    }
                                                    break;
                                                }
                                                else if (ghj == "V")
                                                {
                                                    Console.WriteLine("volviendo");
                                                    foreach (String items in Alimento)
                                                    {
                                                        Console.WriteLine(items);
                                                    }
                                                    break;
                                                }
                                                else
                                                {
                                                    Console.WriteLine("respuesta invalida");
                                                }
                                            }
                                        }
                                        else
                                        {
                                            Console.WriteLine("Ésa respuesta no es válida.");
                                            break;
                                        }
                                    }
                                }
                                else if (asd == "C")
                                {
                                    Console.WriteLine("¿A quien desea aplicar cura?");
                                    Console.WriteLine("\nGanado [G]");
                                    Console.WriteLine("Plantacion [P]");
                                    while (true)
                                    {
                                        poi = Console.ReadLine().ToUpper();
                                        if (poi == "P")
                                        {
                                            Console.WriteLine("¿QUE desea usar?");
                                            Console.WriteLine("\nHerbicida [H]");
                                            Console.WriteLine("Fungicida [F]");
                                            Console.WriteLine("Pesticida [P]");
                                            Console.WriteLine("\nVOLVER [V]");
                                            while (true)
                                            {
                                                klp = Console.ReadLine().ToUpper();
                                                if (klp == "H")
                                                {
                                                    fb.Message(5);
                                                    herbic.Sort();
                                                    while (true)
                                                    {
                                                        ans = Console.ReadLine().ToUpper();
                                                        if (ans == "S")
                                                        {
                                                            for (int i = 0; i < herbic.Count; i++)
                                                            {
                                                                if (herbic[i] == "Herbicida")
                                                                {
                                                                    Console.WriteLine("Se ha usado un Herbicida");
                                                                    herbic.Remove("Herbicida");
                                                                    break;
                                                                }
                                                                else if (herbic[i] != "Herbicida")
                                                                {
                                                                    Console.WriteLine("no tiene herbicida");
                                                                }
                                                            }
                                                        }
                                                        else if (ans == "C")
                                                        {
                                                            buyingConsumable.ConsumibleMarket += Consu.OnBuy1;
                                                            buyingConsumable.Buying();
                                                            if (cashMoney < 80.24)
                                                            {
                                                                Console.WriteLine("... ESPERA, \nno tienes dinero suficiente vuelva mas tarde");
                                                            }
                                                            else if (cashMoney >= 80.24)
                                                            {
                                                                cashMoney  -= 80.24;
                                                                inventario += "\nHerbicida";
                                                                Cura.Add("Herbicida");
                                                                herbic.Add("Herbicida");
                                                            }
                                                            break;
                                                        }
                                                        break;
                                                    }
                                                    break;
                                                }
                                                else if (klp == "F")
                                                {
                                                    fb.Message(5);
                                                    fungi.Sort();
                                                    while (true)
                                                    {
                                                        ans = Console.ReadLine().ToUpper();
                                                        if (ans == "S")
                                                        {
                                                            for (int i = 0; i < fungi.Count; i++)
                                                            {
                                                                if (fungi[i] == "Fungicida")
                                                                {
                                                                    Console.WriteLine("Se ha usado un Fungicida");
                                                                    fungi.Remove("Fungicida");
                                                                    break;
                                                                }
                                                                else if (fungi[i] != "Fungicida")
                                                                {
                                                                    Console.WriteLine("no tiene fungicida");
                                                                }
                                                            }
                                                        }
                                                        else if (ans == "C")
                                                        {
                                                            buyingConsumable.ConsumibleMarket += Consu.OnBuy;
                                                            buyingConsumable.Buying();

                                                            if (cashMoney < 48.20)
                                                            {
                                                                Console.WriteLine("... ESPERA, \nno tienes dinero suficiente vuelva mas tarde");
                                                            }
                                                            else if (cashMoney >= 48.20)
                                                            {
                                                                cashMoney  -= 48.20;
                                                                inventario += "\nfungicida";
                                                                Cura.Add("Fungicida");
                                                                fungi.Add("Fungicida");
                                                            }
                                                            break;
                                                        }
                                                        break;
                                                    }
                                                    break;
                                                }
                                                else if (klp == "P")
                                                {
                                                    fb.Message(5);
                                                    pesti.Sort();
                                                    while (true)
                                                    {
                                                        ans = Console.ReadLine().ToUpper();
                                                        if (ans == "S")
                                                        {
                                                            for (int i = 0; i < pesti.Count; i++)
                                                            {
                                                                if (pesti[i] == "Pesticida")
                                                                {
                                                                    Console.WriteLine("Se ha usado un Pesticida");
                                                                    pesti.Remove("Pesticida");
                                                                    break;
                                                                }
                                                                else if (pesti[i] != "Pesticida")
                                                                {
                                                                    Console.WriteLine("no tiene pesticida");
                                                                }
                                                            }
                                                        }
                                                        else if (ans == "C")
                                                        {
                                                            buyingConsumable.ConsumibleMarket += Consu.OnBuy2;
                                                            buyingConsumable.Buying();
                                                            if (cashMoney < 42.80)
                                                            {
                                                                Console.WriteLine("... ESPERA, \nno tienes dinero suficiente vuelva mas tarde");
                                                            }
                                                            else if (cashMoney >= 42.80)
                                                            {
                                                                cashMoney  -= 42.80;
                                                                inventario += "\npesticida";
                                                                pesti.Add("Pesticida");
                                                                Cura.Add("Pesticida");
                                                            }
                                                            break;
                                                        }
                                                        break;
                                                    }
                                                    break;
                                                }
                                                else if (klp == "V")
                                                {
                                                    Console.WriteLine("Volviendo");
                                                    foreach (String items in Cura)
                                                    {
                                                        Console.WriteLine(items);
                                                    }
                                                    break;
                                                }
                                                else
                                                {
                                                    Console.WriteLine("respuesta invalida");
                                                }
                                            }
                                        }
                                        else if (poi == "G")
                                        {
                                            fb.Message(5);
                                            vacun.Sort();
                                            while (true)
                                            {
                                                ans = Console.ReadLine().ToUpper();
                                                if (ans == "S")
                                                {
                                                    for (int i = 0; i < vacun.Count; i++)
                                                    {
                                                        if (vacun[i] == "Vacuna")
                                                        {
                                                            Console.WriteLine("Se ha usado un Vacuna");
                                                            vacun.Remove("Vacuna");
                                                            break;
                                                        }
                                                        else if (vacun[i] != "Vacuna")
                                                        {
                                                            Console.WriteLine("no tiene vacunas");
                                                        }
                                                    }
                                                }
                                                else if (ans == "C")
                                                {
                                                    buyingConsumable.ConsumibleMarket += Consu.OnBuy3;
                                                    buyingConsumable.Buying();

                                                    if (cashMoney < 28.40)
                                                    {
                                                        Console.WriteLine("... ESPERA, \nno tienes dinero suficiente vuelva mas tarde");
                                                    }
                                                    else if (cashMoney >= 28.40)
                                                    {
                                                        cashMoney  -= 28.40;
                                                        inventario += "\nvacuna";
                                                        vacun.Add("Vacuna");
                                                        Cura.Add("Vacuna");
                                                    }
                                                    break;
                                                }
                                                break;
                                            }
                                            break;
                                        }
                                        else if (fgt == "V")
                                        {
                                            Console.WriteLine("VOLVIENDO");
                                            foreach (String items in Cura)
                                            {
                                                Console.WriteLine(items);
                                            }
                                            break;
                                        }
                                        else
                                        {
                                            Console.WriteLine("Ésa respuesta no es válida.");
                                        }
                                    }
                                }
                                else if (asd == "V")
                                {
                                    Console.WriteLine("volviendo");
                                    break;
                                }
                                else
                                {
                                    Console.WriteLine("Ésa respuesta no es válida.");
                                }
                            }
                            break;
                        }
                        else if (admins == "A")
                        {
                            if (bodegasJugador >= 1 & productoAlmacenado == true)
                            {
                                Console.WriteLine("Tiene los siguientes productos almacenados");
                                for (int i = 0; i < almacen.Count; i++)
                                {
                                    Console.WriteLine(almacen[i]);
                                }
                                Console.WriteLine("¿desea vender uno de estos productos? [Y/N]");
                                // aqui se pondrian los diccionarios
                                while (true)
                                {
                                    vent = Console.ReadLine().ToUpper();
                                    if (vent == "Y")
                                    {
                                        Console.WriteLine("a vendido un producto");
                                        ganancia  += (calidad * compraG);
                                        cashMoney += ganancia;
                                        break;
                                    }
                                    else if (vent == "N")
                                    {
                                        Console.WriteLine("no ha vendido nada");
                                        break;
                                    }
                                    else
                                    {
                                        Console.WriteLine("respuesta invalida");
                                    }
                                    ganancia = 0;
                                }
                            }
                            else
                            {
                                Console.WriteLine("no tiene bodega o no tiene productos almacenados");
                                break;
                            }
                            break;
                        }
                        else if (admins == "V")
                        {
                            Console.WriteLine("volviendo");
                            break;
                        }
                        else
                        {
                            Console.WriteLine("Ésa respuesta no es válida.");
                        }
                    }
                }
            }
        }
コード例 #3
0
        public void Mmensaje(int a)
        {
            if (a == 0)
            {
                FunctionBrain b = new FunctionBrain();
                //EdifMarket b1 = new EdifMarket();
                Seed          nuevaSeed       = new Seed("nombre", 5, 1, 1, 1, 1, 4, 10, 25, 4, 1, 1, 1, 10, 1, 5, 0);
                Plantation    nuevaPlantation = new Plantation("nombre", 5, "A", 1.5, 3, 2, false, 100, 100, 1);
                Cattle        nuevoGanado     = new Cattle("nombre", 2.5, "B", 30, 0.5, 0.2, 1, 1, 2, 1);
                List <string> almacen         = new List <string>()
                {
                    "tomato", "letucce", "carrot", "potato", "corn", "onion", "celery"
                };
                Dictionary <string, (int, int)> ejemplo          = new Dictionary <string, (int, int)>();
                Ir_al_mercado_de_consumibles    buyingConsumable = new Ir_al_mercado_de_consumibles();
                Ir_al_mercado_de_edificaciones  DestSell         = new Ir_al_mercado_de_edificaciones();
                CompraConsumible Consu = new CompraConsumible();
                VentaDestruir    VD    = new VentaDestruir();

                double variacion;
                int    maduracionPlanta;
                int    maduracionGanado;
                int    verificandoMaleza;
                int    verificandoGusano;
                int    unidad;
                int    calidad;
                double verificandoMuerte;
                double verificandoEscape;
                double verificandoEnfermedad;
                double verificandoEnfermedadG;
                double compraG;
                double compraP;
                bool   enfermedad;
                bool   enfermedadG;
                bool   gusano;
                bool   maleza;
                bool   muerte;
                bool   escape;
                int    bodegasJugador;
                bool   productoAlmacenado;
                var    random      = new Random();
                int    probaMaleza = random.Next(0, 100);
                int    probaGusano = random.Next(0, 100);
                double probaMuerte = random.Next(0, 100);
                double probaEscape = random.Next(0, 100);
                double probaEnfer  = random.Next(0, 100);
                double ganancia;
                variacion             = nuevaSeed.GetPriceVariation();
                maduracionPlanta      = nuevaPlantation.GetMaturity();
                maduracionGanado      = nuevoGanado.GetMaturity();
                verificandoMaleza     = nuevaPlantation.GetWeedChance();
                verificandoGusano     = nuevaPlantation.GetWormChance();
                verificandoEnfermedad = nuevaPlantation.GetDiseaseChance();
                verificandoEscape     = nuevoGanado.GetScapeChance();
                verificandoMuerte     = nuevoGanado.GetSuddenDeathChance();
                unidad = nuevoGanado.GetUnidad();
                verificandoEnfermedadG = nuevoGanado.GetDesease();
                calidad            = nuevoAlmacen.GetQuality();
                compraG            = nuevoGanado.GetPurchasePrice();
                compraP            = nuevaPlantation.GetPurchasePrice();
                productoAlmacenado = true;
                enfermedad         = false;
                gusano             = false;
                maleza             = false;
                muerte             = false;
                escape             = false;
                bodegasJugador     = 0;
                ganancia           = 0;
                if (a == 0)
                {
                    while (true)
                    {
                        b.Message(1);
                        answ = Console.ReadLine().ToUpper();
                        if (answ == "E")
                        {
                            b.Message(2);
                            answe = Console.ReadLine().ToUpper();
                            //Console.ReadKey();
                            while (true)
                            {
                                answe = Console.ReadLine().ToUpper();
                                if (answe == "P")
                                {
                                    //b1.EdifMarket("P", cashMoney);
                                }
                                else if (answe == "G")
                                {
                                    //b1.EdifMarket("G", cashMoney);
                                }
                                else if (answe == "A")
                                {
                                    Console.WriteLine("Desea comprar un edificio de almacenamiento (bodegas) [Y/N]");

                                    while (true)
                                    {
                                        bod = Console.ReadLine().ToUpper();
                                        if (bod == "Y")
                                        {
                                            Console.WriteLine("a comprado una bodega");
                                            bodegasJugador += 1;
                                            cashMoney      -= compraP;
                                            cashMoney      -= compraG;
                                            break;
                                        }
                                        else if (bod == "N")
                                        {
                                            Console.WriteLine("no ha comprado nada");
                                            break;
                                        }
                                        else
                                        {
                                            Console.WriteLine("respuesta invalida");
                                        }
                                    }
                                    // b.EdifMarket("A", cashMoney);
                                }
                                else if (answe == "D")
                                {
                                    b.Message(4);
                                    resp = Console.ReadLine().ToUpper();
                                    while (true)
                                    {
                                        if (resp == "D")
                                        {
                                            Console.WriteLine("ha destruido el edificio");
                                            DestSell.DestructionSell += VD.OnSellOrDestruction;
                                            DestSell.descision();
                                            cashMoney -= (cashMoney * ((0.5) + (0.078 * 2)));
                                            Console.WriteLine("  dinero actual:  " + cashMoney);
                                            break;
                                        }
                                        else if (resp == "B")
                                        {
                                            Console.WriteLine("ha vendido el edificio");
                                            DestSell.DestructionSell += VD.OnSellOrDestruction1;
                                            DestSell.descision1();
                                            cashMoney += (cashMoney * (0.64) - (0.433));
                                            Console.WriteLine("  dinero actual:  " + cashMoney);
                                            break;
                                        }
                                        else if (resp == "V")
                                        {
                                            Console.WriteLine("VOLVIENDO AL MENU ANTERIOR");
                                            Console.WriteLine(cashMoney);
                                            Console.ReadKey();
                                            break;
                                        }
                                        else
                                        {
                                            Console.WriteLine("respuesta invalida");
                                        }
                                    }
                                    break;
                                }
                                else if (answe == "V")
                                {
                                    Console.WriteLine("volviendo al mercado");
                                    Console.ReadKey();
                                    break;
                                }
                                else
                                {
                                    Console.WriteLine("respuesta invalida");
                                }
                            }
                        }
                        else if (answ == "C")
                        {
                            b.Message(3);
                            while (true)
                            {
                                ali = Console.ReadLine().ToUpper();
                                if (ali == "A")
                                {
                                    Console.WriteLine("¿que ALIMENTO quiere comprar?");
                                    Console.WriteLine("\nFertilizante [T]");
                                    Console.WriteLine("Riego [R]");
                                    Console.WriteLine("Alimento para animales [A]");
                                    Console.WriteLine("Agua para animales [W]");
                                    Console.WriteLine("\nVOLVER");
                                    while (true)
                                    {
                                        res = Console.ReadLine().ToUpper();
                                        if (res == "T")
                                        {
                                            buyingConsumable.ConsumibleMarket += Consu.OnBuy4;
                                            buyingConsumable.Buying();

                                            if (cashMoney < 33.45)
                                            {
                                                Console.WriteLine("... ESPERA, \nno tienes dinero suficiente vuelva mas tarde");
                                            }
                                            else if (cashMoney >= 33.45)
                                            {
                                                cashMoney  -= 33.45;
                                                inventario += "\nFertilizante";
                                                Alimento.Add("Fertilizante");
                                                fertil.Add("Fertilizante");
                                            }
                                        }
                                        else if (res == "R")
                                        {
                                            buyingConsumable.ConsumibleMarket += Consu.OnBuy5;
                                            buyingConsumable.Buying();

                                            if (cashMoney < 56.31)
                                            {
                                                Console.WriteLine("... ESPERA, \nno tienes dinero suficiente vuelva mas tarde");
                                            }
                                            else if (cashMoney >= 56.31)
                                            {
                                                cashMoney  -= 56.31;
                                                inventario += "\nriego";
                                                Alimento.Add("Riego");
                                                riego.Add("Riego");
                                            }
                                        }
                                        // se copio desde aca hasta
                                        else if (res == "A")
                                        {
                                            buyingConsumable.ConsumibleMarket += Consu.OnBuy6;
                                            buyingConsumable.Buying();

                                            if (cashMoney < 44.96)
                                            {
                                                Console.WriteLine("... ESPERA, \nno tienes dinero suficiente vuelva mas tarde");
                                            }
                                            else if (cashMoney >= 44.96)
                                            {
                                                cashMoney  -= 44.96;
                                                inventario += "\nAlimento para animales";
                                                Alimento.Add("Alimento para animales");
                                                AliAnimales.Add("Alimento para animales");
                                            }
                                            // hasta aca
                                        }
                                        else if (res == "W")
                                        {
                                            buyingConsumable.ConsumibleMarket += Consu.OnBuy7;
                                            buyingConsumable.Buying();

                                            if (cashMoney < 54.45)
                                            {
                                                Console.WriteLine("... ESPERA, \nno tienes dinero suficiente vuelva mas tarde");
                                            }
                                            else if (cashMoney >= 54.45)
                                            {
                                                cashMoney  -= 54.45;
                                                inventario += "\nAgua para animales";
                                                Alimento.Add("Agua para animales");
                                                AguAnimales.Add("Agua para animales");
                                            }
                                        }
                                        else if (res == "V")
                                        {
                                            Console.WriteLine(cashMoney);
                                            Console.WriteLine("a comprado en total lo siguientes productos:  ");
                                            Console.WriteLine(inventario);
                                            Console.WriteLine("volviendo");
                                            Console.ReadKey();
                                            break;
                                        }

                                        else
                                        {
                                            Console.WriteLine("respuesta invalida");
                                        }
                                    }
                                    break;
                                }
                                else if (ali == "C")
                                {
                                    Console.WriteLine("¿que CURA quiere comprar?");
                                    Console.WriteLine("\nHerbicida [H]");
                                    Console.WriteLine("Fungicida [F]");
                                    Console.WriteLine("Pesticida [P]");
                                    Console.WriteLine("Vacunas [G]");
                                    Console.WriteLine("\nVOLVERE");
                                    while (true)
                                    {
                                        res = Console.ReadLine().ToUpper();
                                        if (res == "F")
                                        {
                                            buyingConsumable.ConsumibleMarket += Consu.OnBuy;
                                            buyingConsumable.Buying();

                                            if (cashMoney < 48.20)
                                            {
                                                Console.WriteLine("... ESPERA, \nno tienes dinero suficiente vuelva mas tarde");
                                            }
                                            else if (cashMoney >= 48.20)
                                            {
                                                cashMoney  -= 48.20;
                                                inventario += "\nfungicida";
                                                Cura.Add("Fungicida");
                                            }
                                        }
                                        else if (res == "H")
                                        {
                                            buyingConsumable.ConsumibleMarket += Consu.OnBuy1;
                                            buyingConsumable.Buying();
                                            if (cashMoney < 80.24)
                                            {
                                                Console.WriteLine("... ESPERA, \nno tienes dinero suficiente vuelva mas tarde");
                                            }
                                            else if (cashMoney >= 80.24)
                                            {
                                                cashMoney  -= 80.24;
                                                inventario += "\nHerbicida";
                                                Cura.Add("Herbicida");
                                            }
                                        }

                                        else if (res == "P")
                                        {
                                            buyingConsumable.ConsumibleMarket += Consu.OnBuy2;
                                            buyingConsumable.Buying();
                                            if (cashMoney < 42.80)
                                            {
                                                Console.WriteLine("... ESPERA, \nno tienes dinero suficiente vuelva mas tarde");
                                            }
                                            else if (cashMoney >= 42.80)
                                            {
                                                cashMoney  -= 42.80;
                                                inventario += "\npesticida";
                                                Cura.Add("Pesticida");
                                            }
                                        }

                                        else if (res == "G")
                                        {
                                            buyingConsumable.ConsumibleMarket += Consu.OnBuy3;
                                            buyingConsumable.Buying();

                                            if (cashMoney < 28.40)
                                            {
                                                Console.WriteLine("... ESPERA, \nno tienes dinero suficiente vuelva mas tarde");
                                            }
                                            else if (cashMoney >= 28.40)
                                            {
                                                cashMoney  -= 28.40;
                                                inventario += "\nvacuna";
                                                Cura.Add("Vacuna");
                                            }
                                        }
                                        else if (res == "V")
                                        {
                                            Console.WriteLine(cashMoney);
                                            Console.WriteLine("a comprado en total lo siguientes productos:  ");
                                            Console.WriteLine(inventario);
                                            Console.WriteLine("volviendo");
                                            Console.ReadKey();
                                            break;
                                        }

                                        else
                                        {
                                            Console.WriteLine("respuesta invalida");
                                        }
                                    }
                                    break;
                                }
                            }
                            break;
                        }


                        else if (answ == "P")
                        {
                            Console.WriteLine("Mercado de PROPIEDADES");
                            Console.ReadKey();
                            break;
                        }
                        else if (answ == "H")
                        {
                            Console.WriteLine("Precios HISTORICOS de las semillas");
                            Console.ReadKey();
                            break;
                        }
                        else if (answ == "V")
                        {
                            Console.WriteLine("volviendo al menu anterior");
                            Console.ReadKey();
                            break;
                        }
                        else
                        {
                            Console.WriteLine("Ésa respuesta no es válida.");
                        }
                    }
                }
            }
        }