Beispiel #1
0
        public Stack <Card> GetNopeCards()
        {
            Stack <Card> cards = new Stack <Card>();
            Nope         one   = new Nope(Game, id++);

            one.CardImage = new BitmapImage(new Uri("pack://application:,,,/ExplodingKittensLib;Component/Images/card_nope_1.jpg", UriKind.Absolute));
            Nope two = new Nope(Game, id++);

            two.CardImage = new BitmapImage(new Uri("pack://application:,,,/ExplodingKittensLib;Component/Images/card_nope_2.jpg", UriKind.Absolute));
            Nope three = new Nope(Game, id++);

            three.CardImage = new BitmapImage(new Uri("pack://application:,,,/ExplodingKittensLib;Component/Images/card_nope_3.jpg", UriKind.Absolute));
            Nope four = new Nope(Game, id++);

            four.CardImage = new BitmapImage(new Uri("pack://application:,,,/ExplodingKittensLib;Component/Images/card_nope_4.jpg", UriKind.Absolute));
            Nope five = new Nope(Game, id++);

            five.CardImage = new BitmapImage(new Uri("pack://application:,,,/ExplodingKittensLib;Component/Images/card_nope_5.jpg", UriKind.Absolute));
            cards.Push(one);
            cards.Push(two);
            cards.Push(three);
            cards.Push(four);
            cards.Push(five);

            return(cards);
        }
Beispiel #2
0
    public Nope CalcularPorcentaje(Calculo calc)
    {
        double        anual = calc.monto * calc.frecuencia;
        double        ranual;
        List <double> aportaciones = new List <double>();

        for (int i = 0; i < (18 - calc.edad); i++)
        {
            Random azar = new Random();
            int    luck = azar.Next(1, 1100);
            int    coin = azar.Next(1, 2);
            if (coin == 1)
            {
                ranual = anual - Convert.ToDouble(luck);
            }
            else
            {
                ranual = anual + Convert.ToDouble(luck);
            }
            if (i < 1)
            {
                aportaciones.Add((anual * .035) + anual);
            }
            else
            {
                aportaciones.Add((aportaciones[i - 1]) + (aportaciones[i - 1] * .035) + ranual);
            }
        }
        Nope x = new Nope();

        x.num1 = aportaciones[0];
        x.num2 = aportaciones[1];
        x.num3 = aportaciones[2];
        //HttpContext.Current.Session["Alcance"];
        return(x);
    }
Beispiel #3
0
 internal void AnswerNope()
 {
     Nope?.Invoke();
 }