Пример #1
0
 public void AtacarJugador(List <Cartas> posiblesAtacantes, int cartaElegida, Jugador jugador)
 {
     jugador.vida -= posiblesAtacantes[cartaElegida].ataque;
 }
        private void BotonCargarPartidaP1_Click(object sender, RoutedEventArgs e)
        {
            Stream          stream  = File.Open("jugador1Guardado.dat", FileMode.Open);
            Stream          stream2 = File.Open("jugador2Guardado.dat", FileMode.Open);
            BinaryFormatter bf      = new BinaryFormatter();

            ListaJugadores.Add((Jugador)bf.Deserialize(stream));
            ListaJugadores.Add((Jugador)bf.Deserialize(stream2));
            Jugador Jugador1 = ListaJugadores[0];
            Jugador Jugador2 = ListaJugadores[1];

            TituloP1.Visibility                   = System.Windows.Visibility.Hidden;
            Jugador1P1.Visibility                 = System.Windows.Visibility.Hidden;
            Jugador2P1.Visibility                 = System.Windows.Visibility.Hidden;
            LabelIngresarNombreP1.Visibility      = System.Windows.Visibility.Hidden;
            LabelIngresarHeroesP1.Visibility      = System.Windows.Visibility.Hidden;
            TextBoxIngresarNombresJ1P1.Visibility = System.Windows.Visibility.Hidden;
            TextBoxIngresarNombresJ2P1.Visibility = System.Windows.Visibility.Hidden;
            TextBoxIngresarHeroesJ1P1.Visibility  = System.Windows.Visibility.Hidden;
            TextBoxIngresarHeroesJ2P1.Visibility  = System.Windows.Visibility.Hidden;
            BotonCargarPartidaP1.Visibility       = System.Windows.Visibility.Hidden;
            BotonComenzarP1.Visibility            = System.Windows.Visibility.Hidden;
            LabelHeroeMalJ1P1.Visibility          = System.Windows.Visibility.Hidden;
            LabelHeroeMalJ2P1.Visibility          = System.Windows.Visibility.Hidden;
            TurnoDeP2.Visibility                  = System.Windows.Visibility.Visible;
            VidaP2.Visibility                     = System.Windows.Visibility.Visible;
            ManaP2.Visibility                     = System.Windows.Visibility.Visible;
            UsarPoderP2.Visibility                = System.Windows.Visibility.Visible;
            LeyendaCartasP2.Visibility            = System.Windows.Visibility.Visible;
            LabelMostrarManoP2.Visibility         = System.Windows.Visibility.Visible;
            LabelMostrarTuTableroP2.Visibility    = System.Windows.Visibility.Visible;
            LabelMostrarTableroRivalP2.Visibility = System.Windows.Visibility.Visible;
            ListBoxManoP2.Visibility              = System.Windows.Visibility.Visible;
            ListBoxTuTableroP2.Visibility         = System.Windows.Visibility.Visible;
            ListBoxTableroRivalP2.Visibility      = System.Windows.Visibility.Visible;
            LabelMenuAtacarP2.Visibility          = System.Windows.Visibility.Visible;
            LabelInstrucciones1P2.Visibility      = System.Windows.Visibility.Visible;
            CartaAtacanteP2.Visibility            = System.Windows.Visibility.Visible;
            LabelInstrucciones2P2.Visibility      = System.Windows.Visibility.Visible;
            CartaAtacadaP2.Visibility             = System.Windows.Visibility.Visible;
            LabelMenuJugarCartaP2.Visibility      = System.Windows.Visibility.Visible;
            BotonAtacarP2.Visibility              = System.Windows.Visibility.Visible;
            LabelInstrucciones4P2.Visibility      = System.Windows.Visibility.Visible;
            CartaAJugarP2.Visibility              = System.Windows.Visibility.Visible;
            BotonJugarCartaP2.Visibility          = System.Windows.Visibility.Visible;
            BotonGuardarYSalirP2.Visibility       = System.Windows.Visibility.Visible;
            BotonTerminarTurnoP2.Visibility       = System.Windows.Visibility.Visible;
            LabelAtacarHeroeP2.Visibility         = System.Windows.Visibility.Visible;
            CartaAtacanteHeroesP2.Visibility      = System.Windows.Visibility.Visible;
            BotonAtacarHeroeP2.Visibility         = System.Windows.Visibility.Visible;
            LabelInstrucciones7P2.Visibility      = System.Windows.Visibility.Visible;
            VidaRivalP2.Visibility                = System.Windows.Visibility.Visible;
            TurnoDeP2.Content                     = "Turno de " + ListaJugadores[turno].nombre;
            VidaP2.Content                 = "Vida: " + ListaJugadores[turno].vida;
            ManaP2.Content                 = "Mana: " + ListaJugadores[turno].manaTurno;
            ListBoxManoP2.ItemsSource      = ListaJugadores[turno].manoDisponible;
            ListBoxTuTableroP2.ItemsSource = ListaJugadores[turno].tableroDisponible;
            ListBoxManoP2.ItemsSource      = ListaJugadores[turno].manoDisponible;
            ListBoxTuTableroP2.ItemsSource = ListaJugadores[turno].tableroDisponible;
            if (turno == 1)
            {
                ListBoxTableroRivalP2.ItemsSource = ListaJugadores[turno - 1].tableroDisponible;
            }
            else if (turno == 0)
            {
                ListBoxTableroRivalP2.ItemsSource = ListaJugadores[turno + 1].tableroDisponible;
            }

            if (turno == 1)
            {
                VidaRivalP2.Content = null;
                VidaRivalP2.Content = "Vida rival: " + ListaJugadores[turno - 1].vida;
            }
            else if (turno == 0)
            {
                VidaRivalP2.Content = null;
                VidaRivalP2.Content = "Vida rival: " + ListaJugadores[turno + 1].vida;
            }
        }
        private void BotonComenzarP1_Click(object sender, RoutedEventArgs e)
        {
            if ((TextBoxIngresarHeroesJ1P1.Text != "Druid") && (TextBoxIngresarHeroesJ1P1.Text != "Hunter") && (TextBoxIngresarHeroesJ1P1.Text != "Mage") && (TextBoxIngresarHeroesJ1P1.Text != "Paladin") && (TextBoxIngresarHeroesJ1P1.Text != "Priest") && (TextBoxIngresarHeroesJ1P1.Text != "Rogue") && (TextBoxIngresarHeroesJ1P1.Text != "Shaman") && (TextBoxIngresarHeroesJ1P1.Text != "Warlock") && (TextBoxIngresarHeroesJ1P1.Text != "Warrior") && (TextBoxIngresarHeroesJ1P1.Text != "druid") && (TextBoxIngresarHeroesJ1P1.Text != "hunter") && (TextBoxIngresarHeroesJ1P1.Text != "mage") && (TextBoxIngresarHeroesJ1P1.Text != "paladin") && (TextBoxIngresarHeroesJ1P1.Text != "priest") && (TextBoxIngresarHeroesJ1P1.Text != "rogue") && (TextBoxIngresarHeroesJ1P1.Text != "shaman") && (TextBoxIngresarHeroesJ1P1.Text != "warlock") && (TextBoxIngresarHeroesJ1P1.Text != "warrior"))
            {
                if ((TextBoxIngresarHeroesJ2P1.Text != "Druid") && (TextBoxIngresarHeroesJ2P1.Text != "Hunter") && (TextBoxIngresarHeroesJ2P1.Text != "Mage") && (TextBoxIngresarHeroesJ2P1.Text != "Paladin") && (TextBoxIngresarHeroesJ2P1.Text != "Priest") && (TextBoxIngresarHeroesJ2P1.Text != "Rogue") && (TextBoxIngresarHeroesJ2P1.Text != "Shaman") && (TextBoxIngresarHeroesJ2P1.Text != "Warlock") && (TextBoxIngresarHeroesJ2P1.Text != "Warrior") && (TextBoxIngresarHeroesJ2P1.Text != "druid") && (TextBoxIngresarHeroesJ2P1.Text != "hunter") && (TextBoxIngresarHeroesJ2P1.Text != "mage") && (TextBoxIngresarHeroesJ2P1.Text != "paladin") && (TextBoxIngresarHeroesJ2P1.Text != "priest") && (TextBoxIngresarHeroesJ2P1.Text != "rogue") && (TextBoxIngresarHeroesJ2P1.Text != "shaman") && (TextBoxIngresarHeroesJ2P1.Text != "warlock") && (TextBoxIngresarHeroesJ2P1.Text != "warrior"))
                {
                    LabelHeroeMalJ1P1.Visibility = System.Windows.Visibility.Visible;
                    LabelHeroeMalJ2P1.Visibility = System.Windows.Visibility.Visible;
                }

                else
                {
                    LabelHeroeMalJ1P1.Visibility = System.Windows.Visibility.Visible;
                }
            }
            else if ((TextBoxIngresarHeroesJ2P1.Text != "Druid") && (TextBoxIngresarHeroesJ2P1.Text != "Hunter") && (TextBoxIngresarHeroesJ2P1.Text != "Mage") && (TextBoxIngresarHeroesJ2P1.Text != "Paladin") && (TextBoxIngresarHeroesJ2P1.Text != "Priest") && (TextBoxIngresarHeroesJ2P1.Text != "Rogue") && (TextBoxIngresarHeroesJ2P1.Text != "Shaman") && (TextBoxIngresarHeroesJ2P1.Text != "Warlock") && (TextBoxIngresarHeroesJ2P1.Text != "Warrior") && (TextBoxIngresarHeroesJ2P1.Text != "druid") && (TextBoxIngresarHeroesJ2P1.Text != "hunter") && (TextBoxIngresarHeroesJ2P1.Text != "mage") && (TextBoxIngresarHeroesJ2P1.Text != "paladin") && (TextBoxIngresarHeroesJ2P1.Text != "priest") && (TextBoxIngresarHeroesJ2P1.Text != "rogue") && (TextBoxIngresarHeroesJ2P1.Text != "shaman") && (TextBoxIngresarHeroesJ2P1.Text != "warlock") && (TextBoxIngresarHeroesJ2P1.Text != "warrior"))
            {
                if ((TextBoxIngresarHeroesJ1P1.Text != "Druid") && (TextBoxIngresarHeroesJ1P1.Text != "Hunter") && (TextBoxIngresarHeroesJ1P1.Text != "Mage") && (TextBoxIngresarHeroesJ1P1.Text != "Paladin") && (TextBoxIngresarHeroesJ1P1.Text != "Priest") && (TextBoxIngresarHeroesJ1P1.Text != "Rogue") && (TextBoxIngresarHeroesJ1P1.Text != "Shaman") && (TextBoxIngresarHeroesJ1P1.Text != "Warlock") && (TextBoxIngresarHeroesJ1P1.Text != "Warrior") && (TextBoxIngresarHeroesJ1P1.Text != "druid") && (TextBoxIngresarHeroesJ1P1.Text != "hunter") && (TextBoxIngresarHeroesJ1P1.Text != "mage") && (TextBoxIngresarHeroesJ1P1.Text != "paladin") && (TextBoxIngresarHeroesJ1P1.Text != "priest") && (TextBoxIngresarHeroesJ1P1.Text != "rogue") && (TextBoxIngresarHeroesJ1P1.Text != "shaman") && (TextBoxIngresarHeroesJ1P1.Text != "warlock") && (TextBoxIngresarHeroesJ1P1.Text != "warrior"))
                {
                    LabelHeroeMalJ1P1.Visibility = System.Windows.Visibility.Visible;
                    LabelHeroeMalJ2P1.Visibility = System.Windows.Visibility.Visible;
                }
                else
                {
                    LabelHeroeMalJ2P1.Visibility = System.Windows.Visibility.Visible;
                }
            }
            else
            {
                TituloP1.Visibility                   = System.Windows.Visibility.Hidden;
                Jugador1P1.Visibility                 = System.Windows.Visibility.Hidden;
                Jugador2P1.Visibility                 = System.Windows.Visibility.Hidden;
                LabelIngresarNombreP1.Visibility      = System.Windows.Visibility.Hidden;
                LabelIngresarHeroesP1.Visibility      = System.Windows.Visibility.Hidden;
                TextBoxIngresarNombresJ1P1.Visibility = System.Windows.Visibility.Hidden;
                TextBoxIngresarNombresJ2P1.Visibility = System.Windows.Visibility.Hidden;
                TextBoxIngresarHeroesJ1P1.Visibility  = System.Windows.Visibility.Hidden;
                TextBoxIngresarHeroesJ2P1.Visibility  = System.Windows.Visibility.Hidden;
                BotonCargarPartidaP1.Visibility       = System.Windows.Visibility.Hidden;
                BotonComenzarP1.Visibility            = System.Windows.Visibility.Hidden;
                LabelHeroeMalJ1P1.Visibility          = System.Windows.Visibility.Hidden;
                LabelHeroeMalJ2P1.Visibility          = System.Windows.Visibility.Hidden;
                TurnoDeP2.Visibility                  = System.Windows.Visibility.Visible;
                VidaP2.Visibility                     = System.Windows.Visibility.Visible;
                ManaP2.Visibility                     = System.Windows.Visibility.Visible;
                UsarPoderP2.Visibility                = System.Windows.Visibility.Visible;
                LeyendaCartasP2.Visibility            = System.Windows.Visibility.Visible;
                LabelMostrarManoP2.Visibility         = System.Windows.Visibility.Visible;
                LabelMostrarTuTableroP2.Visibility    = System.Windows.Visibility.Visible;
                LabelMostrarTableroRivalP2.Visibility = System.Windows.Visibility.Visible;
                ListBoxManoP2.Visibility              = System.Windows.Visibility.Visible;
                ListBoxTuTableroP2.Visibility         = System.Windows.Visibility.Visible;
                ListBoxTableroRivalP2.Visibility      = System.Windows.Visibility.Visible;
                LabelMenuAtacarP2.Visibility          = System.Windows.Visibility.Visible;
                LabelInstrucciones1P2.Visibility      = System.Windows.Visibility.Visible;
                CartaAtacanteP2.Visibility            = System.Windows.Visibility.Visible;
                LabelInstrucciones2P2.Visibility      = System.Windows.Visibility.Visible;
                CartaAtacadaP2.Visibility             = System.Windows.Visibility.Visible;
                LabelMenuJugarCartaP2.Visibility      = System.Windows.Visibility.Visible;
                BotonAtacarP2.Visibility              = System.Windows.Visibility.Visible;
                LabelInstrucciones4P2.Visibility      = System.Windows.Visibility.Visible;
                CartaAJugarP2.Visibility              = System.Windows.Visibility.Visible;
                BotonJugarCartaP2.Visibility          = System.Windows.Visibility.Visible;
                BotonGuardarYSalirP2.Visibility       = System.Windows.Visibility.Visible;
                BotonTerminarTurnoP2.Visibility       = System.Windows.Visibility.Visible;
                LabelAtacarHeroeP2.Visibility         = System.Windows.Visibility.Visible;
                CartaAtacanteHeroesP2.Visibility      = System.Windows.Visibility.Visible;
                BotonAtacarHeroeP2.Visibility         = System.Windows.Visibility.Visible;
                LabelInstrucciones7P2.Visibility      = System.Windows.Visibility.Visible;
                VidaRivalP2.Visibility                = System.Windows.Visibility.Visible;
                ReclutaManoDePlata                    = new Cartas(0, 1, 1, "Esbirro de Plata");
                Cartas healingTotem = new Cartas(0, 0, 2, "Healing Totem");
                listaCartasShaman.Add(healingTotem);
                Cartas searingTotem = new Cartas(0, 1, 1, "Searing Totem");
                listaCartasShaman.Add(searingTotem);
                Cartas stoneclawTotem = new Cartas(0, 0, 2, "StoneClaw Totem");
                listaCartasShaman.Add(stoneclawTotem);
                Cartas wrathOfAirTotem = new Cartas(0, 0, 2, "Wrath Of Air Totem");
                listaCartasShaman.Add(wrathOfAirTotem);
                Cartas pichon = new Cartas(0, 0, 10000000, "pichon");
                dagger = new Cartas(0, 1, 2, "Dagger");
                Cartas        wisp1              = new Cartas(0, 1, 1, "wisp");
                Cartas        wisp2              = new Cartas(0, 1, 1, "wisp");
                Cartas        wisp3              = new Cartas(0, 1, 1, "wisp");
                Cartas        wisp4              = new Cartas(0, 1, 1, "wisp");
                Cartas        wisp5              = new Cartas(0, 1, 1, "wisp");
                Cartas        wisp6              = new Cartas(0, 1, 1, "wisp");
                Cartas        murlocRaider1      = new Cartas(1, 1, 2, "Murloc Raider");
                Cartas        murlocRaider2      = new Cartas(1, 1, 2, "Murloc Raider");
                Cartas        murlocRaider3      = new Cartas(1, 1, 2, "Murloc Raider");
                Cartas        murlocRaider4      = new Cartas(1, 1, 2, "Murloc Raider");
                Cartas        murlocRaider5      = new Cartas(1, 1, 2, "Murloc Raider");
                Cartas        murlocRaider6      = new Cartas(1, 1, 2, "Murloc Raider");
                Cartas        bloodfenRaptor1    = new Cartas(2, 3, 2, "Bloodfen Raptor");
                Cartas        bloodfenRaptor2    = new Cartas(2, 3, 2, "Bloodfen Raptor");
                Cartas        bloodfenRaptor3    = new Cartas(2, 3, 2, "Bloodfen Raptor");
                Cartas        bloodfenRaptor4    = new Cartas(2, 3, 2, "Bloodfen Raptor");
                Cartas        bloodfenRaptor5    = new Cartas(2, 3, 2, "Bloodfen Raptor");
                Cartas        bloodfenRaptor6    = new Cartas(2, 3, 2, "Bloodfen Raptor");
                Cartas        riverCrocolisk1    = new Cartas(2, 2, 3, "River CrocoLisk");
                Cartas        riverCrocolisk2    = new Cartas(2, 2, 3, "River CrocoLisk");
                Cartas        riverCrocolisk3    = new Cartas(2, 2, 3, "River CrocoLisk");
                Cartas        riverCrocolisk4    = new Cartas(2, 2, 3, "River CrocoLisk");
                Cartas        riverCrocolisk5    = new Cartas(2, 2, 3, "River CrocoLisk");
                Cartas        riverCrocolisk6    = new Cartas(2, 2, 3, "River CrocoLisk");
                Cartas        magmaRager1        = new Cartas(3, 5, 1, "Magma Rager");
                Cartas        magmaRager2        = new Cartas(3, 5, 1, "Magma Rager");
                Cartas        magmaRager3        = new Cartas(3, 5, 1, "Magma Rager");
                Cartas        magmaRager4        = new Cartas(3, 5, 1, "Magma Rager");
                Cartas        magmaRager5        = new Cartas(3, 5, 1, "Magma Rager");
                Cartas        magmaRager6        = new Cartas(3, 5, 1, "Magma Rager");
                Cartas        chillwindYeti1     = new Cartas(4, 4, 5, "Chill Wind Yeti");
                Cartas        chillwindYeti2     = new Cartas(4, 4, 5, "Chill Wind Yeti");
                Cartas        chillwindYeti3     = new Cartas(4, 4, 5, "Chill Wind Yeti");
                Cartas        chillwindYeti4     = new Cartas(4, 4, 5, "Chill Wind Yeti");
                Cartas        chillwindYeti5     = new Cartas(4, 4, 5, "Chill Wind Yeti");
                Cartas        chillwindYeti6     = new Cartas(4, 4, 5, "Chill Wind Yeti");
                Cartas        oasisSnapjaw1      = new Cartas(4, 2, 7, "Oasis Snap Jaw");
                Cartas        oasisSnapjaw2      = new Cartas(4, 2, 7, "Oasis Snap Jaw");
                Cartas        oasisSnapjaw3      = new Cartas(4, 2, 7, "Oasis Snap Jaw");
                Cartas        oasisSnapjaw4      = new Cartas(4, 2, 7, "Oasis Snap Jaw");
                Cartas        oasisSnapjaw5      = new Cartas(4, 2, 7, "Oasis Snap Jaw");
                Cartas        oasisSnapjaw6      = new Cartas(4, 2, 7, "Oasis Snap Jaw");
                Cartas        boulderfistOgre1   = new Cartas(6, 6, 7, "Boulder Fist Ogre");
                Cartas        boulderfistOgre2   = new Cartas(6, 6, 7, "Boulder Fist Ogre");
                Cartas        boulderfistOgre3   = new Cartas(6, 6, 7, "Boulder Fist Ogre");
                Cartas        boulderfistOgre4   = new Cartas(6, 6, 7, "Boulder Fist Ogre");
                Cartas        boulderfistOgre5   = new Cartas(6, 6, 7, "Boulder Fist Ogre");
                Cartas        boulderfistOgre6   = new Cartas(6, 6, 7, "Boulder Fist Ogre");
                Cartas        warGolem1          = new Cartas(7, 7, 7, "War Golem");
                Cartas        warGolem2          = new Cartas(7, 7, 7, "War Golem");
                Cartas        warGolem3          = new Cartas(7, 7, 7, "War Golem");
                Cartas        warGolem4          = new Cartas(7, 7, 7, "War Golem");
                Cartas        warGolem5          = new Cartas(7, 7, 7, "War Golem");
                Cartas        warGolem6          = new Cartas(7, 7, 7, "War Golem");
                Cartas        coreHound1         = new Cartas(7, 9, 5, "Core Hound");
                Cartas        coreHound2         = new Cartas(7, 9, 5, "Core Hound");
                Cartas        coreHound3         = new Cartas(7, 9, 5, "Core Hound");
                Cartas        coreHound4         = new Cartas(7, 9, 5, "Core Hound");
                Cartas        coreHound5         = new Cartas(7, 9, 5, "Core Hound");
                Cartas        coreHound6         = new Cartas(7, 9, 5, "Core Hound");
                Cartas        theCoin            = new Cartas(0, 0, 0, "the coin");
                List <Cartas> ManoJugador1       = new List <Cartas>();
                List <Cartas> ManoJugador2       = new List <Cartas>();
                List <Cartas> MazoJugador1       = new List <Cartas>();
                List <Cartas> MazoJugador2       = new List <Cartas>();
                List <Cartas> TableroJugador1    = new List <Cartas>();
                List <Cartas> TableroJugador2    = new List <Cartas>();
                List <string> ManoDisponible1    = new List <string>();
                List <string> ManoDisponible2    = new List <string>();
                List <string> TableroDisponible1 = new List <string>();
                List <string> TableroDisponible2 = new List <string>();
                MazoJugador1.Add(wisp1);
                MazoJugador1.Add(wisp2);
                MazoJugador1.Add(wisp3);
                MazoJugador2.Add(wisp4);
                MazoJugador2.Add(wisp5);
                MazoJugador2.Add(wisp6);
                MazoJugador1.Add(murlocRaider1);
                MazoJugador1.Add(murlocRaider2);
                MazoJugador1.Add(murlocRaider3);
                MazoJugador2.Add(murlocRaider4);
                MazoJugador2.Add(murlocRaider5);
                MazoJugador2.Add(murlocRaider6);
                MazoJugador1.Add(bloodfenRaptor1);
                MazoJugador1.Add(bloodfenRaptor2);
                MazoJugador1.Add(bloodfenRaptor3);
                MazoJugador2.Add(bloodfenRaptor4);
                MazoJugador2.Add(bloodfenRaptor5);
                MazoJugador2.Add(bloodfenRaptor6);
                MazoJugador1.Add(riverCrocolisk1);
                MazoJugador1.Add(riverCrocolisk2);
                MazoJugador1.Add(riverCrocolisk3);
                MazoJugador2.Add(riverCrocolisk4);
                MazoJugador2.Add(riverCrocolisk5);
                MazoJugador2.Add(riverCrocolisk6);
                MazoJugador1.Add(magmaRager1);
                MazoJugador1.Add(magmaRager2);
                MazoJugador1.Add(magmaRager3);
                MazoJugador2.Add(magmaRager4);
                MazoJugador2.Add(magmaRager5);
                MazoJugador2.Add(magmaRager6);
                MazoJugador1.Add(chillwindYeti1);
                MazoJugador1.Add(chillwindYeti2);
                MazoJugador1.Add(chillwindYeti3);
                MazoJugador2.Add(chillwindYeti4);
                MazoJugador2.Add(chillwindYeti5);
                MazoJugador2.Add(chillwindYeti6);
                MazoJugador1.Add(oasisSnapjaw1);
                MazoJugador1.Add(oasisSnapjaw2);
                MazoJugador1.Add(oasisSnapjaw3);
                MazoJugador2.Add(oasisSnapjaw4);
                MazoJugador2.Add(oasisSnapjaw5);
                MazoJugador2.Add(oasisSnapjaw6);
                MazoJugador1.Add(boulderfistOgre1);
                MazoJugador1.Add(boulderfistOgre2);
                MazoJugador1.Add(boulderfistOgre3);
                MazoJugador2.Add(boulderfistOgre4);
                MazoJugador2.Add(boulderfistOgre5);
                MazoJugador2.Add(boulderfistOgre6);
                MazoJugador1.Add(warGolem1);
                MazoJugador1.Add(warGolem2);
                MazoJugador1.Add(warGolem3);
                MazoJugador2.Add(warGolem4);
                MazoJugador2.Add(warGolem5);
                MazoJugador2.Add(warGolem6);
                MazoJugador1.Add(coreHound1);
                MazoJugador1.Add(coreHound2);
                MazoJugador1.Add(coreHound3);
                MazoJugador2.Add(coreHound4);
                MazoJugador2.Add(coreHound5);
                MazoJugador2.Add(coreHound6);
                Jugador Jugador1 = new Jugador(0, 30, 0, ManoJugador1, MazoJugador1, "", TableroJugador1, "", 0, pichon, ManoDisponible1, TableroDisponible1, 0);
                Jugador Jugador2 = new Jugador(0, 30, 0, ManoJugador2, MazoJugador2, "", TableroJugador2, "", 0, pichon, ManoDisponible2, TableroDisponible2, 0);
                Jugador1.nombre = TextBoxIngresarNombresJ1P1.Text;
                Jugador2.nombre = TextBoxIngresarNombresJ2P1.Text;
                Jugador1.heroe  = TextBoxIngresarHeroesJ1P1.Text;
                Jugador2.heroe  = TextBoxIngresarHeroesJ2P1.Text;
                ListaJugadores.Add(Jugador1);
                ListaJugadores.Add(Jugador2);
                crearMano(Jugador1, Jugador2, turno, theCoin);
                ListaJugadores[turno].ManaGrowth();
                ListaJugadores[turno].manaTurno  = 0;
                ListaJugadores[turno].manaTurno += ListaJugadores[turno].mana;
                TurnoDeP2.Content = "Turno de " + ListaJugadores[turno].nombre;
                VidaP2.Content    = "Vida: " + ListaJugadores[turno].vida;
                ManaP2.Content    = "Mana: " + ListaJugadores[turno].manaTurno;
                int i = 0;
                while (i < ListaJugadores.Count)
                {
                    int a = 0;
                    while (a < ListaJugadores[i].mano.Count)
                    {
                        ListaJugadores[i].manoDisponible.Add(ListaJugadores[i].mano[a].nombre + " | " + ListaJugadores[i].mano[a].vida + " | " + ListaJugadores[i].mano[a].ataque + " | " + ListaJugadores[i].mano[a].costo);
                        a += 1;
                    }

                    i += 1;
                }

                ListBoxManoP2.ItemsSource      = ListaJugadores[turno].manoDisponible;
                ListBoxTuTableroP2.ItemsSource = ListaJugadores[turno].tableroDisponible;
                if (turno == 1)
                {
                    ListBoxTableroRivalP2.ItemsSource = ListaJugadores[turno - 1].tableroDisponible;
                }
                else if (turno == 0)
                {
                    ListBoxTableroRivalP2.ItemsSource = ListaJugadores[turno + 1].tableroDisponible;
                }

                if (turno == 1)
                {
                    VidaRivalP2.Content = null;
                    VidaRivalP2.Content = "Vida rival: " + ListaJugadores[turno - 1].vida;
                }
                else if (turno == 0)
                {
                    VidaRivalP2.Content = null;
                    VidaRivalP2.Content = "Vida rival: " + ListaJugadores[turno + 1].vida;
                }
            }
        }
 public void UsarPoder(Jugador JugadorPoder, Jugador JugadorOponente, Cartas carta, List <Cartas> lista, Cartas arma)
 {
     if (JugadorPoder.manaTurno >= 2)
     {
         if (JugadorPoder.heroe == "Warrior" || JugadorPoder.heroe == "warrior")
         {
             JugadorPoder.armadura  += 2;
             JugadorPoder.manaTurno -= 2;
             ManaP2.Content          = null;
             ManaP2.Content          = "Mana: " + JugadorPoder.manaTurno;
         }
         else if (JugadorPoder.heroe == "Hunter" || JugadorPoder.heroe == "hunter")
         {
             JugadorOponente.vida   -= 2;
             VidaRivalP2.Content     = null;
             VidaRivalP2.Content     = "Vida Rival: " + JugadorOponente.vida;
             JugadorPoder.manaTurno -= 2;
             ManaP2.Content          = null;
             ManaP2.Content          = "Mana: " + JugadorPoder.manaTurno;
             if (JugadorOponente.vida <= 0)
             {
                 this.Close();
             }
         }
         else if (JugadorPoder.heroe == "Druid" || JugadorPoder.heroe == "druid")
         {
             JugadorPoder.damage    += 1;
             JugadorPoder.armadura  += 1;
             JugadorPoder.manaTurno -= 2;
             ManaP2.Content          = null;
             ManaP2.Content          = "Mana: " + JugadorPoder.manaTurno;
         }
         else if (JugadorPoder.heroe == "Mage" || JugadorPoder.heroe == "mage")
         {
             JugadorOponente.vida   -= 1;
             VidaRivalP2.Content     = null;
             VidaRivalP2.Content     = "Vida Rival: " + JugadorOponente.vida;
             JugadorPoder.manaTurno -= 2;
             ManaP2.Content          = null;
             ManaP2.Content          = "Mana: " + JugadorPoder.manaTurno;
             if (JugadorOponente.vida <= 0)
             {
                 this.Close();
             }
         }
         else if (JugadorPoder.heroe == "Paladin" || JugadorPoder.heroe == "paladin")
         {
             JugadorPoder.tablero.Add(carta);
             JugadorPoder.tableroDisponible.Add(carta.nombre + " | " + carta.vida + " | " + carta.ataque + " | " + carta.costo);
             JugadorPoder.manaTurno        -= 2;
             ListBoxTuTableroP2.ItemsSource = null;
             ListBoxTuTableroP2.ItemsSource = JugadorPoder.tableroDisponible;
             ManaP2.Content = null;
             ManaP2.Content = "Mana: " + JugadorPoder.manaTurno;
         }
         else if (JugadorPoder.heroe == "Priest" || JugadorPoder.heroe == "priest")
         {
             JugadorPoder.vida      += 2;
             VidaP2.Content          = null;
             VidaP2.Content          = "Vida: " + JugadorPoder.vida;
             JugadorPoder.manaTurno -= 2;
             ManaP2.Content          = null;
             ManaP2.Content          = "Mana: " + JugadorPoder.manaTurno;
         }
         else if (JugadorPoder.heroe == "Rogue" || JugadorPoder.heroe == "rogue")
         {
             JugadorPoder.arma       = arma;
             JugadorPoder.manaTurno -= 2;
             ManaP2.Content          = null;
             ManaP2.Content          = "Mana: " + JugadorPoder.manaTurno;
         }
         else if (JugadorPoder.heroe == "Shaman" || JugadorPoder.heroe == "shaman")
         {
             Random rnd        = new Random();
             int    largoLista = rnd.Next(0, 4);
             JugadorPoder.tablero.Add(lista[largoLista]);
             JugadorPoder.tableroDisponible.Add(lista[largoLista].nombre + " | " + lista[largoLista].vida + " | " + lista[largoLista].ataque + " | " + lista[largoLista].costo);
             ListBoxTuTableroP2.ItemsSource = null;
             ListBoxTuTableroP2.ItemsSource = JugadorPoder.tableroDisponible;
             JugadorPoder.manaTurno        -= 2;
             ManaP2.Content = null;
             ManaP2.Content = "Mana: " + JugadorPoder.manaTurno;
         }
         else if (JugadorPoder.heroe == "Warlock" || JugadorPoder.heroe == "warlock")
         {
             JugadorPoder.vida -= 2;
             Random rmd         = new Random();
             int    cartaASacar = rmd.Next(0, JugadorPoder.mazo.Count);
             JugadorPoder.mano.Add(JugadorPoder.mazo[cartaASacar]);
             JugadorPoder.manoDisponible.Add(JugadorPoder.mazo[cartaASacar].nombre + " | " + JugadorPoder.mazo[cartaASacar].vida + " | " + JugadorPoder.mazo[cartaASacar].ataque + " | " + JugadorPoder.mazo[cartaASacar].costo);
             JugadorPoder.mazo.Remove(JugadorPoder.mazo[cartaASacar]);
             VidaP2.Content          = null;
             VidaP2.Content          = "Vida: " + JugadorPoder.vida;
             JugadorPoder.manaTurno -= 2;
             ManaP2.Content          = null;
             ManaP2.Content          = "Mana: " + JugadorPoder.manaTurno;
             if (JugadorPoder.vida <= 0)
             {
                 this.Close();
             }
         }
     }
 }
        private void BotonComenzarP1_Click(object sender, RoutedEventArgs e)
        {
            if ((TextBoxIngresarHeroesJ1P1.Text != "Druid") && (TextBoxIngresarHeroesJ1P1.Text != "Hunter") && (TextBoxIngresarHeroesJ1P1.Text != "Mage") && (TextBoxIngresarHeroesJ1P1.Text != "Paladin") && (TextBoxIngresarHeroesJ1P1.Text != "Priest") && (TextBoxIngresarHeroesJ1P1.Text != "Rogue") && (TextBoxIngresarHeroesJ1P1.Text != "Shaman") && (TextBoxIngresarHeroesJ1P1.Text != "Warlock") && (TextBoxIngresarHeroesJ1P1.Text != "Warrior") && (TextBoxIngresarHeroesJ1P1.Text != "druid") && (TextBoxIngresarHeroesJ1P1.Text != "hunter") && (TextBoxIngresarHeroesJ1P1.Text != "mage") && (TextBoxIngresarHeroesJ1P1.Text != "paladin") && (TextBoxIngresarHeroesJ1P1.Text != "priest") && (TextBoxIngresarHeroesJ1P1.Text != "rogue") && (TextBoxIngresarHeroesJ1P1.Text != "shaman") && (TextBoxIngresarHeroesJ1P1.Text != "warlock") && (TextBoxIngresarHeroesJ1P1.Text != "warrior"))
            {
                if ((TextBoxIngresarHeroesJ2P1.Text != "Druid") && (TextBoxIngresarHeroesJ2P1.Text != "Hunter") && (TextBoxIngresarHeroesJ2P1.Text != "Mage") && (TextBoxIngresarHeroesJ2P1.Text != "Paladin") && (TextBoxIngresarHeroesJ2P1.Text != "Priest") && (TextBoxIngresarHeroesJ2P1.Text != "Rogue") && (TextBoxIngresarHeroesJ2P1.Text != "Shaman") && (TextBoxIngresarHeroesJ2P1.Text != "Warlock") && (TextBoxIngresarHeroesJ2P1.Text != "Warrior") && (TextBoxIngresarHeroesJ2P1.Text != "druid") && (TextBoxIngresarHeroesJ2P1.Text != "hunter") && (TextBoxIngresarHeroesJ2P1.Text != "mage") && (TextBoxIngresarHeroesJ2P1.Text != "paladin") && (TextBoxIngresarHeroesJ2P1.Text != "priest") && (TextBoxIngresarHeroesJ2P1.Text != "rogue") && (TextBoxIngresarHeroesJ2P1.Text != "shaman") && (TextBoxIngresarHeroesJ2P1.Text != "warlock") && (TextBoxIngresarHeroesJ2P1.Text != "warrior"))
                {
                    LabelHeroeMalJ1P1.Visibility = System.Windows.Visibility.Visible;
                    LabelHeroeMalJ2P1.Visibility = System.Windows.Visibility.Visible;
                }

                else
                {
                    LabelHeroeMalJ1P1.Visibility = System.Windows.Visibility.Visible;
                }
            }
            else if ((TextBoxIngresarHeroesJ2P1.Text != "Druid") && (TextBoxIngresarHeroesJ2P1.Text != "Hunter") && (TextBoxIngresarHeroesJ2P1.Text != "Mage") && (TextBoxIngresarHeroesJ2P1.Text != "Paladin") && (TextBoxIngresarHeroesJ2P1.Text != "Priest") && (TextBoxIngresarHeroesJ2P1.Text != "Rogue") && (TextBoxIngresarHeroesJ2P1.Text != "Shaman") && (TextBoxIngresarHeroesJ2P1.Text != "Warlock") && (TextBoxIngresarHeroesJ2P1.Text != "Warrior") && (TextBoxIngresarHeroesJ2P1.Text != "druid") && (TextBoxIngresarHeroesJ2P1.Text != "hunter") && (TextBoxIngresarHeroesJ2P1.Text != "mage") && (TextBoxIngresarHeroesJ2P1.Text != "paladin") && (TextBoxIngresarHeroesJ2P1.Text != "priest") && (TextBoxIngresarHeroesJ2P1.Text != "rogue") && (TextBoxIngresarHeroesJ2P1.Text != "shaman") && (TextBoxIngresarHeroesJ2P1.Text != "warlock") && (TextBoxIngresarHeroesJ2P1.Text != "warrior"))
            {
                if ((TextBoxIngresarHeroesJ1P1.Text != "Druid") && (TextBoxIngresarHeroesJ1P1.Text != "Hunter") && (TextBoxIngresarHeroesJ1P1.Text != "Mage") && (TextBoxIngresarHeroesJ1P1.Text != "Paladin") && (TextBoxIngresarHeroesJ1P1.Text != "Priest") && (TextBoxIngresarHeroesJ1P1.Text != "Rogue") && (TextBoxIngresarHeroesJ1P1.Text != "Shaman") && (TextBoxIngresarHeroesJ1P1.Text != "Warlock") && (TextBoxIngresarHeroesJ1P1.Text != "Warrior") && (TextBoxIngresarHeroesJ1P1.Text != "druid") && (TextBoxIngresarHeroesJ1P1.Text != "hunter") && (TextBoxIngresarHeroesJ1P1.Text != "mage") && (TextBoxIngresarHeroesJ1P1.Text != "paladin") && (TextBoxIngresarHeroesJ1P1.Text != "priest") && (TextBoxIngresarHeroesJ1P1.Text != "rogue") && (TextBoxIngresarHeroesJ1P1.Text != "shaman") && (TextBoxIngresarHeroesJ1P1.Text != "warlock") && (TextBoxIngresarHeroesJ1P1.Text != "warrior"))
                {
                    LabelHeroeMalJ1P1.Visibility = System.Windows.Visibility.Visible;
                    LabelHeroeMalJ2P1.Visibility = System.Windows.Visibility.Visible;
                }
                else
                {
                    LabelHeroeMalJ2P1.Visibility = System.Windows.Visibility.Visible;
                }
            }
            else
            {
                TituloP1.Visibility                   = System.Windows.Visibility.Hidden;
                Jugador1P1.Visibility                 = System.Windows.Visibility.Hidden;
                Jugador2P1.Visibility                 = System.Windows.Visibility.Hidden;
                LabelIngresarNombreP1.Visibility      = System.Windows.Visibility.Hidden;
                LabelIngresarHeroesP1.Visibility      = System.Windows.Visibility.Hidden;
                TextBoxIngresarNombresJ1P1.Visibility = System.Windows.Visibility.Hidden;
                TextBoxIngresarNombresJ2P1.Visibility = System.Windows.Visibility.Hidden;
                TextBoxIngresarHeroesJ1P1.Visibility  = System.Windows.Visibility.Hidden;
                TextBoxIngresarHeroesJ2P1.Visibility  = System.Windows.Visibility.Hidden;
                BotonCargarPartidaP1.Visibility       = System.Windows.Visibility.Hidden;
                BotonComenzarP1.Visibility            = System.Windows.Visibility.Hidden;
                LabelHeroeMalJ1P1.Visibility          = System.Windows.Visibility.Hidden;
                LabelHeroeMalJ2P1.Visibility          = System.Windows.Visibility.Hidden;
                TurnoDeP2.Visibility                  = System.Windows.Visibility.Visible;
                VidaP2.Visibility                     = System.Windows.Visibility.Visible;
                ManaP2.Visibility                     = System.Windows.Visibility.Visible;
                UsarPoderP2.Visibility                = System.Windows.Visibility.Visible;
                LeyendaCartasP2.Visibility            = System.Windows.Visibility.Visible;
                LabelMostrarManoP2.Visibility         = System.Windows.Visibility.Visible;
                LabelMostrarTuTableroP2.Visibility    = System.Windows.Visibility.Visible;
                LabelMostrarTableroRivalP2.Visibility = System.Windows.Visibility.Visible;
                ListBoxManoP2.Visibility              = System.Windows.Visibility.Visible;
                ListBoxTuTableroP2.Visibility         = System.Windows.Visibility.Visible;
                ListBoxTableroRivalP2.Visibility      = System.Windows.Visibility.Visible;
                LabelMenuAtacarP2.Visibility          = System.Windows.Visibility.Visible;
                LabelInstrucciones1P2.Visibility      = System.Windows.Visibility.Visible;
                CartaAtacanteP2.Visibility            = System.Windows.Visibility.Visible;
                LabelInstrucciones2P2.Visibility      = System.Windows.Visibility.Visible;
                CartaAtacadaP2.Visibility             = System.Windows.Visibility.Visible;
                LabelMenuJugarCartaP2.Visibility      = System.Windows.Visibility.Visible;
                BotonAtacarP2.Visibility              = System.Windows.Visibility.Visible;
                LabelInstrucciones3P2.Visibility      = System.Windows.Visibility.Visible;
                LabelInstrucciones4P2.Visibility      = System.Windows.Visibility.Visible;
                CartaAJugarP2.Visibility              = System.Windows.Visibility.Visible;
                BotonJugarCartaP2.Visibility          = System.Windows.Visibility.Visible;
                LabelInstrucciones5P2.Visibility      = System.Windows.Visibility.Visible;
                BotonGuardarYSalirP2.Visibility       = System.Windows.Visibility.Visible;
                BotonTerminarTurnoP2.Visibility       = System.Windows.Visibility.Visible;
                List <Cartas> listaCartasShaman = new List <Cartas>();
                Cartas        pichon            = new Cartas(0, 0, 10000000, "pichon");
                Cartas        dagger            = new Cartas(0, 1, 2, "Dagger");
                Cartas        wisp               = new Cartas(0, 1, 1, "wisp");
                Cartas        murlocRaider       = new Cartas(1, 1, 2, "Murloc Raider");
                Cartas        bloodfenRaptor     = new Cartas(2, 3, 2, "Bloodfen Raptor");
                Cartas        riverCrocolisk     = new Cartas(2, 2, 3, "River CrocoLisk");
                Cartas        magmaRager         = new Cartas(3, 5, 1, "Magma Rager");
                Cartas        chillwindYeti      = new Cartas(4, 4, 5, "Chill Wind Yeti");
                Cartas        oasisSnapjaw       = new Cartas(4, 2, 7, "Oasis Snap Jaw");
                Cartas        boulderfistOgre    = new Cartas(6, 6, 7, "Boulder Fist Ogre");
                Cartas        warGolem           = new Cartas(7, 7, 7, "War Golem");
                Cartas        coreHound          = new Cartas(7, 9, 5, "Core Hound");
                Cartas        theCoin            = new Cartas(0, 0, 0, "the coin");
                List <Cartas> ManoJugador1       = new List <Cartas>();
                List <Cartas> ManoJugador2       = new List <Cartas>();
                List <Cartas> MazoJugador1       = new List <Cartas>();
                List <Cartas> MazoJugador2       = new List <Cartas>();
                List <Cartas> TableroJugador1    = new List <Cartas>();
                List <Cartas> TableroJugador2    = new List <Cartas>();
                List <string> ManoDisponible1    = new List <string>();
                List <string> ManoDisponible2    = new List <string>();
                List <string> TableroDisponible1 = new List <string>();
                List <string> TableroDisponible2 = new List <string>();
                MazoJugador1.Add(wisp);
                MazoJugador1.Add(wisp);
                MazoJugador1.Add(wisp);
                MazoJugador2.Add(wisp);
                MazoJugador2.Add(wisp);
                MazoJugador2.Add(wisp);
                MazoJugador1.Add(murlocRaider);
                MazoJugador1.Add(murlocRaider);
                MazoJugador1.Add(murlocRaider);
                MazoJugador2.Add(murlocRaider);
                MazoJugador2.Add(murlocRaider);
                MazoJugador2.Add(murlocRaider);
                MazoJugador1.Add(bloodfenRaptor);
                MazoJugador1.Add(bloodfenRaptor);
                MazoJugador1.Add(bloodfenRaptor);
                MazoJugador2.Add(bloodfenRaptor);
                MazoJugador2.Add(bloodfenRaptor);
                MazoJugador2.Add(bloodfenRaptor);
                MazoJugador1.Add(riverCrocolisk);
                MazoJugador1.Add(riverCrocolisk);
                MazoJugador1.Add(riverCrocolisk);
                MazoJugador2.Add(riverCrocolisk);
                MazoJugador2.Add(riverCrocolisk);
                MazoJugador2.Add(riverCrocolisk);
                MazoJugador1.Add(magmaRager);
                MazoJugador1.Add(magmaRager);
                MazoJugador1.Add(magmaRager);
                MazoJugador2.Add(magmaRager);
                MazoJugador2.Add(magmaRager);
                MazoJugador2.Add(magmaRager);
                MazoJugador1.Add(chillwindYeti);
                MazoJugador1.Add(chillwindYeti);
                MazoJugador1.Add(chillwindYeti);
                MazoJugador2.Add(chillwindYeti);
                MazoJugador2.Add(chillwindYeti);
                MazoJugador2.Add(chillwindYeti);
                MazoJugador1.Add(oasisSnapjaw);
                MazoJugador1.Add(oasisSnapjaw);
                MazoJugador1.Add(oasisSnapjaw);
                MazoJugador2.Add(oasisSnapjaw);
                MazoJugador2.Add(oasisSnapjaw);
                MazoJugador2.Add(oasisSnapjaw);
                MazoJugador1.Add(boulderfistOgre);
                MazoJugador1.Add(boulderfistOgre);
                MazoJugador1.Add(boulderfistOgre);
                MazoJugador2.Add(boulderfistOgre);
                MazoJugador2.Add(boulderfistOgre);
                MazoJugador2.Add(boulderfistOgre);
                MazoJugador1.Add(warGolem);
                MazoJugador1.Add(warGolem);
                MazoJugador1.Add(warGolem);
                MazoJugador2.Add(warGolem);
                MazoJugador2.Add(warGolem);
                MazoJugador2.Add(warGolem);
                MazoJugador1.Add(coreHound);
                MazoJugador1.Add(coreHound);
                MazoJugador1.Add(coreHound);
                MazoJugador2.Add(coreHound);
                MazoJugador2.Add(coreHound);
                MazoJugador2.Add(coreHound);
                Jugador Jugador1 = new Jugador(0, 30, 0, ManoJugador1, MazoJugador1, "", TableroJugador1, "", 0, pichon, ManoDisponible1, TableroDisponible1, 0);
                Jugador Jugador2 = new Jugador(0, 30, 0, ManoJugador2, MazoJugador2, "", TableroJugador2, "", 0, pichon, ManoDisponible2, TableroDisponible2, 0);
                Jugador1.nombre = TextBoxIngresarNombresJ1P1.Text;
                Jugador2.nombre = TextBoxIngresarNombresJ2P1.Text;
                Jugador1.heroe  = TextBoxIngresarHeroesJ1P1.Text;
                Jugador2.heroe  = TextBoxIngresarHeroesJ2P1.Text;
                ListaJugadores.Add(Jugador1);
                ListaJugadores.Add(Jugador2);
                crearMano(Jugador1, Jugador2, turno, theCoin);
                ListaJugadores[turno].ManaGrowth();
                ListaJugadores[turno].manaTurno  = 0;
                ListaJugadores[turno].manaTurno += ListaJugadores[turno].mana;
                TurnoDeP2.Content = "Turno de " + ListaJugadores[turno].nombre;
                VidaP2.Content    = "Vida: " + ListaJugadores[turno].vida;
                ManaP2.Content    = "Mana: " + ListaJugadores[turno].manaTurno;
                int i = 0;
                while (i < ListaJugadores.Count)
                {
                    int a = 0;
                    while (a < ListaJugadores[i].mano.Count)
                    {
                        ListaJugadores[i].manoDisponible.Add(ListaJugadores[i].mano[a].nombre + " | " + ListaJugadores[i].mano[a].vida + " | " + ListaJugadores[i].mano[a].ataque + " | " + ListaJugadores[i].mano[a].costo);
                        a += 1;
                    }

                    i += 1;
                }

                ListBoxManoP2.ItemsSource      = ListaJugadores[turno].manoDisponible;
                ListBoxTuTableroP2.ItemsSource = ListaJugadores[turno].tableroDisponible;
                if (turno == 1)
                {
                    ListBoxTableroRivalP2.ItemsSource = ListaJugadores[turno - 1].tableroDisponible;
                }
                else if (turno == 0)
                {
                    ListBoxTableroRivalP2.ItemsSource = ListaJugadores[turno + 1].tableroDisponible;
                }
            }
        }